[POWERPC] Fix WARN_ON when entering xmon

Whenever we enter xmon we get a WARN_ON out of the rtas code since it
thinks interrupts are still on:

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xd000000000080008
cpu 0x3: Vector: 300 (Data Access) at [c0000000075dba00]
    pc: d000000000080008: .doit+0x8/0x40 [oopser]
    lr: c000000000077704: .sys_init_module+0x1664/0x1824
    sp: c0000000075dbc80
   msr: 9000000000009032
   dar: 0
 dsisr: 42000000
  current = 0xc000000003fa64b0
  paca    = 0xc000000000694280
    pid   = 2260, comm = insmod

------------[ cut here ]------------
Badness at arch/powerpc/kernel/entry_64.S:651
Call Trace:
[C0000000075DAE70] [C00000000000EB64] .show_stack+0x68/0x1b0 (unreliable)
[C0000000075DAF10] [C000000000216254] .report_bug+0x94/0xe8
[C0000000075DAFA0] [C00000000047B140] __kprobes_text_start+0x178/0x584
[C0000000075DB040] [C0000000000044F4] program_check_common+0xf4/0x100

Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Anton Blanchard 2007-03-21 01:48:34 +11:00 committed by Paul Mackerras
parent e7273d2a08
commit f13659e0b3

View File

@ -330,18 +330,17 @@ static void release_output_lock(void)
static int xmon_core(struct pt_regs *regs, int fromipi) static int xmon_core(struct pt_regs *regs, int fromipi)
{ {
int cmd = 0; int cmd = 0;
unsigned long msr;
struct bpt *bp; struct bpt *bp;
long recurse_jmp[JMP_BUF_LEN]; long recurse_jmp[JMP_BUF_LEN];
unsigned long offset; unsigned long offset;
unsigned long flags;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int cpu; int cpu;
int secondary; int secondary;
unsigned long timeout; unsigned long timeout;
#endif #endif
msr = mfmsr(); local_irq_save(flags);
mtmsr(msr & ~MSR_EE); /* disable interrupts */
bp = in_breakpoint_table(regs->nip, &offset); bp = in_breakpoint_table(regs->nip, &offset);
if (bp != NULL) { if (bp != NULL) {
@ -516,7 +515,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
insert_cpu_bpts(); insert_cpu_bpts();
mtmsr(msr); /* restore interrupt enable */ local_irq_restore(flags);
return cmd != 'X' && cmd != EOF; return cmd != 'X' && cmd != EOF;
} }