Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
a71d64b4 56758e3c

+3
+3
arch/powerpc/xmon/xmon.c
··· 24 24 #include <linux/interrupt.h> 25 25 #include <linux/irq.h> 26 26 #include <linux/bug.h> 27 + #include <linux/nmi.h> 27 28 28 29 #include <asm/ptrace.h> 29 30 #include <asm/string.h> ··· 375 374 #endif 376 375 377 376 local_irq_save(flags); 377 + hard_irq_disable(); 378 378 379 379 bp = in_breakpoint_table(regs->nip, &offset); 380 380 if (bp != NULL) { ··· 560 558 #endif 561 559 insert_cpu_bpts(); 562 560 561 + touch_nmi_watchdog(); 563 562 local_irq_restore(flags); 564 563 565 564 return cmd != 'X' && cmd != EOF;