]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()/put_cpu()
authorAshok Raj <ashok.raj@intel.com>
Tue, 6 Sep 2005 22:16:18 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:16 +0000 (16:57 -0700)
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>
arch/x86_64/kernel/genapic_cluster.c

index 9703da7202e368fe97b73b197c57465f1f3e9f34..f6523dd1bc0938fb6f21ff811af0b8292d77ca46 100644 (file)
@@ -72,10 +72,14 @@ static void cluster_send_IPI_mask(cpumask_t mask, int vector)
 static void cluster_send_IPI_allbutself(int vector)
 {
        cpumask_t mask = cpu_online_map;
-       cpu_clear(smp_processor_id(), mask);
+       int me = get_cpu(); /* Ensure we are not preempted when we clear */
+
+       cpu_clear(me, mask);
 
        if (!cpus_empty(mask))
                cluster_send_IPI_mask(mask, vector);
+
+       put_cpu();
 }
 
 static void cluster_send_IPI_all(int vector)