aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/mach-default/mach_ipi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/mach-default/mach_ipi.h')
-rw-r--r--include/asm-i386/mach-default/mach_ipi.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/asm-i386/mach-default/mach_ipi.h b/include/asm-i386/mach-default/mach_ipi.h
index 6f2b17a20089..cc756a67cd63 100644
--- a/include/asm-i386/mach-default/mach_ipi.h
+++ b/include/asm-i386/mach-default/mach_ipi.h
@@ -4,11 +4,34 @@
4void send_IPI_mask_bitmask(cpumask_t mask, int vector); 4void send_IPI_mask_bitmask(cpumask_t mask, int vector);
5void __send_IPI_shortcut(unsigned int shortcut, int vector); 5void __send_IPI_shortcut(unsigned int shortcut, int vector);
6 6
7extern int no_broadcast;
8
7static inline void send_IPI_mask(cpumask_t mask, int vector) 9static inline void send_IPI_mask(cpumask_t mask, int vector)
8{ 10{
9 send_IPI_mask_bitmask(mask, vector); 11 send_IPI_mask_bitmask(mask, vector);
10} 12}
11 13
14static inline void __local_send_IPI_allbutself(int vector)
15{
16 if (no_broadcast) {
17 cpumask_t mask = cpu_online_map;
18 int this_cpu = get_cpu();
19
20 cpu_clear(this_cpu, mask);
21 send_IPI_mask(mask, vector);
22 put_cpu();
23 } else
24 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
25}
26
27static inline void __local_send_IPI_all(int vector)
28{
29 if (no_broadcast)
30 send_IPI_mask(cpu_online_map, vector);
31 else
32 __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
33}
34
12static inline void send_IPI_allbutself(int vector) 35static inline void send_IPI_allbutself(int vector)
13{ 36{
14 /* 37 /*
@@ -18,13 +41,13 @@ static inline void send_IPI_allbutself(int vector)
18 if (!(num_online_cpus() > 1)) 41 if (!(num_online_cpus() > 1))
19 return; 42 return;
20 43
21 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); 44 __local_send_IPI_allbutself(vector);
22 return; 45 return;
23} 46}
24 47
25static inline void send_IPI_all(int vector) 48static inline void send_IPI_all(int vector)
26{ 49{
27 __send_IPI_shortcut(APIC_DEST_ALLINC, vector); 50 __local_send_IPI_all(vector);
28} 51}
29 52
30#endif /* __ASM_MACH_IPI_H */ 53#endif /* __ASM_MACH_IPI_H */