diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-23 18:47:43 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-23 18:47:43 +0100 |
commit | fe6ed1ce99db7ade83400233742cb15f95df65bd (patch) | |
tree | 9718077c82f3cf440f8c394331dd36f8c2a24cd4 /xen/arch/x86/smp.c | |
parent | 22f9491cad364f346986ef2ddb9889bfd6423606 (diff) | |
download | xen-fe6ed1ce99db7ade83400233742cb15f95df65bd.tar.gz xen-fe6ed1ce99db7ade83400233742cb15f95df65bd.tar.bz2 xen-fe6ed1ce99db7ade83400233742cb15f95df65bd.zip |
on_selected_cpus() must not send IPIs with empty target masks.
This causes send accept errors on Pentium/P6 .
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/smp.c')
-rw-r--r-- | xen/arch/x86/smp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index 690bf3121f..fc0a545883 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -106,6 +106,16 @@ void send_IPI_self(int vector) __send_IPI_shortcut(APIC_DEST_SELF, vector); } +static inline void check_IPI_mask(cpumask_t cpumask) +{ + /* + * Sanity, and necessary. An IPI with no target generates a send accept + * error with Pentium and P6 APICs. + */ + ASSERT(cpus_subset(cpumask, cpu_online_map)); + ASSERT(!cpus_empty(cpumask)); +} + /* * This is only used on smaller machines. */ @@ -115,6 +125,8 @@ void send_IPI_mask_bitmask(cpumask_t cpumask, int vector) unsigned long cfg; unsigned long flags; + check_IPI_mask(cpumask); + local_irq_save(flags); /* @@ -146,6 +158,8 @@ inline void send_IPI_mask_sequence(cpumask_t mask, int vector) unsigned long cfg, flags; unsigned int query_cpu; + check_IPI_mask(mask); + /* * Hack. The clustered APIC addressing mode doesn't allow us to send * to an arbitrary mask, so I do a unicasts to each CPU instead. This @@ -304,6 +318,9 @@ extern int on_selected_cpus( ASSERT(local_irq_is_enabled()); + if ( nr_cpus == 0 ) + return 0; + data.func = func; data.info = info; data.wait = wait; |