aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2005-06-25 17:54:52 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:29 -0400
commit67664c8f7e74def5adf66298a1245d82af72db2c (patch)
treec98657d833d3ca61322a8ae54023814ebc36a480 /include
parentf370513640492641b4046bfd9a6e4714f6ae530d (diff)
[PATCH] i386: Dont use IPI broadcast when using cpu hotplug.
This patch introduces a startup parameter no_broadcast. When we enable CONFIG_HOTPLUG_CPU, we dont want to use broadcast shortcut as it has ill effects on a offline cpu. If we issue broadcast, the IPI is also delivered to offline cpus, or partially up cpu causing stale IPI's to be handled, which is a problem and can cause undesirable effects. Introduces a new startup cmdline option no_ipi_broadcast, that can be switched at cmdline if necessary. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-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 */