Skip to content

Commit

Permalink
sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs
Browse files Browse the repository at this point in the history
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: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul E. McKenney authored and David S. Miller committed Sep 3, 2008
1 parent e5bd1c3 commit 4d08461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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;
}

Expand Down

0 comments on commit 4d08461

Please sign in to comment.