ia64/xen-unstable

changeset 9442:b7295a83206e

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>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 23 18:47:43 2006 +0100 (2006-03-23)
parents 8f722ac17efa
children 96e3b02ec931
files xen/arch/x86/smp.c
line diff
     1.1 --- a/xen/arch/x86/smp.c	Thu Mar 23 17:37:37 2006 +0100
     1.2 +++ b/xen/arch/x86/smp.c	Thu Mar 23 18:47:43 2006 +0100
     1.3 @@ -106,6 +106,16 @@ void send_IPI_self(int vector)
     1.4      __send_IPI_shortcut(APIC_DEST_SELF, vector);
     1.5  }
     1.6  
     1.7 +static inline void check_IPI_mask(cpumask_t cpumask)
     1.8 +{
     1.9 +    /*
    1.10 +     * Sanity, and necessary. An IPI with no target generates a send accept
    1.11 +     * error with Pentium and P6 APICs.
    1.12 +     */
    1.13 +    ASSERT(cpus_subset(cpumask, cpu_online_map));
    1.14 +    ASSERT(!cpus_empty(cpumask));
    1.15 +}
    1.16 +
    1.17  /*
    1.18   * This is only used on smaller machines.
    1.19   */
    1.20 @@ -115,6 +125,8 @@ void send_IPI_mask_bitmask(cpumask_t cpu
    1.21      unsigned long cfg;
    1.22      unsigned long flags;
    1.23  
    1.24 +    check_IPI_mask(cpumask);
    1.25 +
    1.26      local_irq_save(flags);
    1.27  
    1.28      /*
    1.29 @@ -146,6 +158,8 @@ inline void send_IPI_mask_sequence(cpuma
    1.30      unsigned long cfg, flags;
    1.31      unsigned int query_cpu;
    1.32  
    1.33 +    check_IPI_mask(mask);
    1.34 +
    1.35      /*
    1.36       * Hack. The clustered APIC addressing mode doesn't allow us to send 
    1.37       * to an arbitrary mask, so I do a unicasts to each CPU instead. This 
    1.38 @@ -304,6 +318,9 @@ extern int on_selected_cpus(
    1.39  
    1.40      ASSERT(local_irq_is_enabled());
    1.41  
    1.42 +    if ( nr_cpus == 0 )
    1.43 +        return 0;
    1.44 +
    1.45      data.func = func;
    1.46      data.info = info;
    1.47      data.wait = wait;