MIPS: add nmi_enter() + nmi_exit() to nmi_exception_handler()
authorPetri Gynther <pgynther@google.com>
Mon, 19 Oct 2015 18:49:52 +0000 (11:49 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 9 Nov 2015 08:56:56 +0000 (09:56 +0100)
We need to enter NMI context when NMI interrupt fires.

Signed-off-by: Petri Gynther <pgynther@google.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11323/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c

index fdb392b27e8109f8b02a1b09b3a3d95cdbd20f14..efcedd43780fbf4a34c71bb215a4932145d2cfc4 100644 (file)
@@ -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 */