diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-05-27 11:15:08 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-05-27 11:15:08 +0100 |
commit | c3da952a0261cb2fa381154a6f22b758a4bd843b (patch) | |
tree | 92496e6fa23a402388431550351e458deedf84ec /xen/arch/x86/genapic | |
parent | cf5e6f2d34413cac233939ab701191655a587ca7 (diff) | |
download | xen-c3da952a0261cb2fa381154a6f22b758a4bd843b.tar.gz xen-c3da952a0261cb2fa381154a6f22b758a4bd843b.tar.bz2 xen-c3da952a0261cb2fa381154a6f22b758a4bd843b.zip |
Pass cpumasks by reference always.
Rather than passing cpumasks by value in all cases (which is
problematic for large NR_CPUS configurations), pass them 'by
reference' (i.e. through a pointer to a const cpumask).
On x86 this changes send_IPI_mask() to always only send IPIs to remote
CPUs (meaning any caller needing to handle the current CPU as well has
to do so on its own).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/genapic')
-rw-r--r-- | xen/arch/x86/genapic/x2apic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c index 3dd97250c7..08ef983699 100644 --- a/xen/arch/x86/genapic/x2apic.c +++ b/xen/arch/x86/genapic/x2apic.c @@ -56,7 +56,7 @@ unsigned int cpu_mask_to_apicid_x2apic(cpumask_t cpumask) return cpu_physical_id(first_cpu(cpumask)); } -void send_IPI_mask_x2apic(cpumask_t cpumask, int vector) +void send_IPI_mask_x2apic(const cpumask_t *cpumask, int vector) { unsigned int cpu, cfg; unsigned long flags; @@ -76,8 +76,9 @@ void send_IPI_mask_x2apic(cpumask_t cpumask, int vector) local_irq_save(flags); cfg = APIC_DM_FIXED | 0 /* no shorthand */ | APIC_DEST_PHYSICAL | vector; - for_each_cpu_mask ( cpu, cpumask ) - apic_wrmsr(APIC_ICR, cfg, cpu_physical_id(cpu)); + for_each_cpu_mask ( cpu, *cpumask ) + if ( cpu != smp_processor_id() ) + apic_wrmsr(APIC_ICR, cfg, cpu_physical_id(cpu)); local_irq_restore(flags); } |