[SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
Otherwise all sorts of bad things can happen, including spurious softlockup reports. Other platforms have this same bug, in one form or another, just don't see the issue because they don't sleep as long as sparc64 can in NOHZ. Thanks to some brilliant debugging by Peter Zijlstra. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
020cfb05f2
commit
2664ef44cf
1 changed files with 23 additions and 6 deletions
|
@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
|
|||
void *info = call_data->info;
|
||||
|
||||
clear_softint(1 << irq);
|
||||
if (call_data->wait) {
|
||||
/* let initiator proceed only after completion */
|
||||
func(info);
|
||||
atomic_inc(&call_data->finished);
|
||||
} else {
|
||||
|
||||
irq_enter();
|
||||
|
||||
if (!call_data->wait) {
|
||||
/* let initiator proceed after getting data */
|
||||
atomic_inc(&call_data->finished);
|
||||
func(info);
|
||||
}
|
||||
|
||||
func(info);
|
||||
|
||||
irq_exit();
|
||||
|
||||
if (call_data->wait) {
|
||||
/* let initiator proceed only after completion */
|
||||
atomic_inc(&call_data->finished);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1032,7 +1039,9 @@ void smp_receive_signal(int cpu)
|
|||
|
||||
void smp_receive_signal_client(int irq, struct pt_regs *regs)
|
||||
{
|
||||
irq_enter();
|
||||
clear_softint(1 << irq);
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
|
||||
|
@ -1040,6 +1049,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
|
|||
struct mm_struct *mm;
|
||||
unsigned long flags;
|
||||
|
||||
irq_enter();
|
||||
|
||||
clear_softint(1 << irq);
|
||||
|
||||
/* See if we need to allocate a new TLB context because
|
||||
|
@ -1059,6 +1070,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
|
|||
load_secondary_context(mm);
|
||||
__flush_tlb_mm(CTX_HWBITS(mm->context),
|
||||
SECONDARY_CONTEXT);
|
||||
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
void smp_new_mmu_context_version(void)
|
||||
|
@ -1217,6 +1230,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
|
|||
{
|
||||
clear_softint(1 << irq);
|
||||
|
||||
irq_enter();
|
||||
|
||||
preempt_disable();
|
||||
|
||||
__asm__ __volatile__("flushw");
|
||||
|
@ -1229,6 +1244,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
|
|||
prom_world(0);
|
||||
|
||||
preempt_enable();
|
||||
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
/* /proc/profile writes can call this, don't __init it please. */
|
||||
|
|
Loading…
Reference in a new issue