diff options
author | Petri Gynther <pgynther@google.com> | 2015-10-19 14:49:52 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-11-09 03:56:56 -0500 |
commit | 7963b3f127a7486815bc10639630c95c2792b811 (patch) | |
tree | 5a089d866b7e67022b6a8e4eaba91039e33e115e | |
parent | 1b4a5ddb127caf125e14551ebd334be1acf21805 (diff) |
MIPS: add nmi_enter() + nmi_exit() to nmi_exception_handler()
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>
-rw-r--r-- | arch/mips/kernel/traps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index fdb392b27e81..efcedd43780f 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) | |||
1856 | { | 1856 | { |
1857 | char str[100]; | 1857 | char str[100]; |
1858 | 1858 | ||
1859 | nmi_enter(); | ||
1859 | raw_notifier_call_chain(&nmi_chain, 0, regs); | 1860 | raw_notifier_call_chain(&nmi_chain, 0, regs); |
1860 | bust_spinlocks(1); | 1861 | bust_spinlocks(1); |
1861 | snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n", | 1862 | snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n", |
1862 | smp_processor_id(), regs->cp0_epc); | 1863 | smp_processor_id(), regs->cp0_epc); |
1863 | regs->cp0_epc = read_c0_errorepc(); | 1864 | regs->cp0_epc = read_c0_errorepc(); |
1864 | die(str, regs); | 1865 | die(str, regs); |
1866 | nmi_exit(); | ||
1865 | } | 1867 | } |
1866 | 1868 | ||
1867 | #define VECTORSPACING 0x100 /* for EI/VI mode */ | 1869 | #define VECTORSPACING 0x100 /* for EI/VI mode */ |