Date: Sat, 30 May 2009 08:53:13 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193085 - head/sys/xen/evtchn Message-ID: <200905300853.n4U8rDol001660@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat May 30 08:53:13 2009 New Revision: 193085 URL: http://svn.freebsd.org/changeset/base/193085 Log: Make ipi_cpu() function as intended. IPI's in Xen are implemented through hypervisor event channels. The MP code creates a pair of IRQs for each base IPI per CPU (one for IPI function dispatch calls, one for IPI bitmap dispatch calls.) Using PCPU_GET() was returning the IRQ of the IPI handler for the current CPU; thus calls to ipi_cpu() were sending itself a message. Instead, looking up the IPI in the target CPU ipi-to-irq map is needed. Note: This doesn't fix Xen SMP (far from it!) but it at least sends IPI's to the right places. Next - sending IPIs.. PR: 135069 Modified: head/sys/xen/evtchn/evtchn.c Modified: head/sys/xen/evtchn/evtchn.c ============================================================================== --- head/sys/xen/evtchn/evtchn.c Sat May 30 07:33:32 2009 (r193084) +++ head/sys/xen/evtchn/evtchn.c Sat May 30 08:53:13 2009 (r193085) @@ -225,12 +225,15 @@ evtchn_do_upcall(struct trapframe *frame } } +/* + * Send an IPI from the current CPU to the destination CPU. + */ void ipi_pcpu(unsigned int cpu, int vector) { int irq; - irq = PCPU_GET(ipi_to_irq[vector]); + irq = pcpu_find(cpu)->pc_ipi_to_irq[vector]; notify_remote_via_irq(irq); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905300853.n4U8rDol001660>