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

Commit 4d084617 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by David S. Miller
Browse files

sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs



Make sparc64 refrain from clearing a given to-be-offlined CPU's bit in the
cpu_online_mask until it has processed pending irqs.  This change
prevents other CPUs from being blindsided by an apparently offline CPU
nevertheless changing globally visible state.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5bd1c3f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1303,10 +1303,6 @@ int __cpu_disable(void)
	c->core_id = 0;
	c->proc_id = -1;

	ipi_call_lock();
	cpu_clear(cpu, cpu_online_map);
	ipi_call_unlock();

	smp_wmb();

	/* Make sure no interrupts point to this cpu.  */
@@ -1316,6 +1312,10 @@ int __cpu_disable(void)
	mdelay(1);
	local_irq_disable();

	ipi_call_lock();
	cpu_clear(cpu, cpu_online_map);
	ipi_call_unlock();

	return 0;
}