Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c2b9d5c authored by Ashok Raj's avatar Ashok Raj Committed by Linus Torvalds
Browse files

[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: default avatarAshok Raj <ashok.raj@intel.com>
Acked-by: default avatarAndi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 19aaabb5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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)