diff options
author | Anton Blanchard <anton@samba.org> | 2014-08-05 00:55:00 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-13 01:13:48 -0400 |
commit | a71d64b4dc4067808549935583d984c7fc9ea647 (patch) | |
tree | 8679cdc9688707feb94e24f19a7c848009f654c4 /arch/powerpc | |
parent | 56758e3c3ca7e3d8960e0e8f881e80adf119f4fe (diff) |
powerpc: Hard disable interrupts in xmon
xmon only soft disables interrupts. This seems like a bad idea - we
certainly don't want decrementer and PMU exceptions going off when
we are debugging something inside xmon.
This issue was uncovered when the hard lockup detector went off
inside xmon. To ensure we wont get a spurious hard lockup warning,
I also call touch_nmi_watchdog() when exiting xmon.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 8d198b5e9e0a..b988b5addf86 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/bug.h> | 26 | #include <linux/bug.h> |
27 | #include <linux/nmi.h> | ||
27 | 28 | ||
28 | #include <asm/ptrace.h> | 29 | #include <asm/ptrace.h> |
29 | #include <asm/string.h> | 30 | #include <asm/string.h> |
@@ -374,6 +375,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi) | |||
374 | #endif | 375 | #endif |
375 | 376 | ||
376 | local_irq_save(flags); | 377 | local_irq_save(flags); |
378 | hard_irq_disable(); | ||
377 | 379 | ||
378 | bp = in_breakpoint_table(regs->nip, &offset); | 380 | bp = in_breakpoint_table(regs->nip, &offset); |
379 | if (bp != NULL) { | 381 | if (bp != NULL) { |
@@ -558,6 +560,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi) | |||
558 | #endif | 560 | #endif |
559 | insert_cpu_bpts(); | 561 | insert_cpu_bpts(); |
560 | 562 | ||
563 | touch_nmi_watchdog(); | ||
561 | local_irq_restore(flags); | 564 | local_irq_restore(flags); |
562 | 565 | ||
563 | return cmd != 'X' && cmd != EOF; | 566 | return cmd != 'X' && cmd != EOF; |