mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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>
This commit is contained in:
1 parent
22f9491cad
commit
fe6ed1ce99
1 file changed
+17
@@ -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;
|
||||
|
||||