summaryrefslogtreecommitdiffstats
path: root/sys/xen
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2009-05-30 08:53:13 +0000
committeradrian <adrian@FreeBSD.org>2009-05-30 08:53:13 +0000
commitddadeb61d5877eaa186b7cb6a0c0bcd89c276f16 (patch)
tree114b1b32966e80fff42645caefb8e08db21fe769 /sys/xen
parent7059dd02fa8ac8944e14eca5897ec27371c19d5d (diff)
downloadFreeBSD-src-ddadeb61d5877eaa186b7cb6a0c0bcd89c276f16.zip
FreeBSD-src-ddadeb61d5877eaa186b7cb6a0c0bcd89c276f16.tar.gz
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
Diffstat (limited to 'sys/xen')
-rw-r--r--sys/xen/evtchn/evtchn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/xen/evtchn/evtchn.c b/sys/xen/evtchn/evtchn.c
index 59d24b2..b175b4a 100644
--- a/sys/xen/evtchn/evtchn.c
+++ b/sys/xen/evtchn/evtchn.c
@@ -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);
}
OpenPOWER on IntegriCloud