Skip to content

Commit

Permalink
[PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()…
Browse files Browse the repository at this point in the history
…/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>
  • Loading branch information
Ashok Raj authored and Linus Torvalds committed Sep 7, 2005
1 parent 19aaabb commit 0c2b9d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/x86_64/kernel/genapic_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0c2b9d5

Please sign in to comment.