On Mon, Oct 19, 2015 at 11:49 AM, Petri Gynther <pgynther@xxxxxxxxxx> wrote: > > We need to enter NMI context when NMI interrupt fires. > > Signed-off-by: Petri Gynther <pgynther@xxxxxxxxxx> > --- > arch/mips/kernel/traps.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c > index fdb392b..efcedd4 100644 > --- a/arch/mips/kernel/traps.c > +++ b/arch/mips/kernel/traps.c > @@ -1856,12 +1856,14 @@ void __noreturn nmi_exception_handler(struct pt_regs *regs) > { > char str[100]; > > + nmi_enter(); > raw_notifier_call_chain(&nmi_chain, 0, regs); > bust_spinlocks(1); > snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n", > smp_processor_id(), regs->cp0_epc); > regs->cp0_epc = read_c0_errorepc(); > die(str, regs); > + nmi_exit(); > } > > #define VECTORSPACING 0x100 /* for EI/VI mode */ > -- > 2.6.0.rc2.230.g3dd15c0 > Any comments/concerns about this patch? On our systems, we have seen stack traces like this: <4>[158549.586000] : [<800103c0>] show_stack+0x78/0x90 <4>[158549.586000] : [<807340a0>] dump_stack+0xd0/0x144 <4>[158549.586000] : [<8006475c>] dequeue_task_idle+0x38/0x4c <4>[158549.586000] : [<80735c8c>] __schedule+0x49c/0xa68 <4>[158549.586000] : [<80736294>] schedule+0x3c/0x9c <4>[158549.586000] : [<80739930>] schedule_timeout+0x144/0x254 <4>[158549.586000] : [<800964f8>] msleep+0x40/0x54 <4>[158549.586000] : [<80010604>] die+0x124/0x130 <4>[158549.586000] : [<80012abc>] set_vi_handler+0x0/0x24 <4>[158549.586000] : <3>[158549.586000] bad: scheduling from the idle thread! 80012a24 <nmi_exception_handler>: ... 80012ab4: 0c004138 jal 800104e0 <die> 80012ab8: 02002821 move a1,s0 80012abc <set_vi_handler>: ...