aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2005-09-06 18:16:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:16 -0400
commit0c2b9d5c035f5a82c9c4ba717984d04838a0701e (patch)
tree0c01a7e7ee5f00cc309a04a51e4fc9a6d2e3ff33 /arch
parent19aaabb5841439988fc357f90d5c59d28fa84658 (diff)
[PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()/put_cpu()
Need to ensure we dont get prempted when we clear ourself from mask when using clustered mode genapic code. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Acked-by: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/genapic_cluster.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c
index 9703da7202e3..f6523dd1bc09 100644
--- a/arch/x86_64/kernel/genapic_cluster.c
+++ b/arch/x86_64/kernel/genapic_cluster.c
@@ -72,10 +72,14 @@ static void cluster_send_IPI_mask(cpumask_t mask, int vector)
72static void cluster_send_IPI_allbutself(int vector) 72static void cluster_send_IPI_allbutself(int vector)
73{ 73{
74 cpumask_t mask = cpu_online_map; 74 cpumask_t mask = cpu_online_map;
75 cpu_clear(smp_processor_id(), mask); 75 int me = get_cpu(); /* Ensure we are not preempted when we clear */
76
77 cpu_clear(me, mask);
76 78
77 if (!cpus_empty(mask)) 79 if (!cpus_empty(mask))
78 cluster_send_IPI_mask(mask, vector); 80 cluster_send_IPI_mask(mask, vector);
81
82 put_cpu();
79} 83}
80 84
81static void cluster_send_IPI_all(int vector) 85static void cluster_send_IPI_all(int vector)