diff options
author | adrian <adrian@FreeBSD.org> | 2009-05-31 08:11:39 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2009-05-31 08:11:39 +0000 |
commit | 30e73eac6de760d0293a34ebc877732430398679 (patch) | |
tree | 84dce0959dd8bd40665e80650616662de09d997c /sys/i386/xen | |
parent | ff7c20c8cbd58cfaf4d3db0cb6fd15a48b58f3fa (diff) | |
download | FreeBSD-src-30e73eac6de760d0293a34ebc877732430398679.zip FreeBSD-src-30e73eac6de760d0293a34ebc877732430398679.tar.gz |
Fix the MP IPI code to differentiate between bitmapped IPIs and function IPIs.
This attempts to fix the IPI handling code to correctly differentiate
between bitmapped IPIs and function IPIs. The Xen IPIs were on low numbers
which clashed with the bitmapped IPIs.
This commit bumps those IPI numbers up to 240 and above (just like in the i386
code) and fiddles with the ipi_vectors[] logic to call the correct function.
This still isn't "right". Specifically, the IPI code may work fine for TLB
shootdown events but the rendezvous/lazypmap IPIs are thrown by calling ipi_*()
routines which don't set the call_func stuff (function id, addr1, addr2) that
the TLB shootdown events are. So the Xen SMP support is still broken.
PR: 135069
Diffstat (limited to 'sys/i386/xen')
-rw-r--r-- | sys/i386/xen/mp_machdep.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c index d389189..f16d25f 100644 --- a/sys/i386/xen/mp_machdep.c +++ b/sys/i386/xen/mp_machdep.c @@ -350,17 +350,11 @@ iv_lazypmap(uintptr_t a, uintptr_t b) atomic_add_int(&smp_tlb_wait, 1); } - -static void -iv_noop(uintptr_t a, uintptr_t b) -{ - atomic_add_int(&smp_tlb_wait, 1); -} - -static call_data_func_t *ipi_vectors[IPI_BITMAP_VECTOR] = +/* + * These start from "IPI offset" APIC_IPI_INTS + */ +static call_data_func_t *ipi_vectors[6] = { - iv_noop, - iv_noop, iv_rendezvous, iv_invltlb, iv_invlpg, @@ -419,10 +413,11 @@ smp_call_function_interrupt(void *unused) atomic_t *started = &call_data->started; atomic_t *finished = &call_data->finished; - if (call_data->func_id > IPI_BITMAP_VECTOR) + /* We only handle function IPIs, not bitmap IPIs */ + if (call_data->func_id < APIC_IPI_INTS || call_data->func_id > IPI_BITMAP_VECTOR) panic("invalid function id %u", call_data->func_id); - func = ipi_vectors[call_data->func_id]; + func = ipi_vectors[call_data->func_id - APIC_IPI_INTS]; /* * Notify initiating CPU that I've grabbed the data and am * about to execute the function |