Re: PowerPC: Sleeping function called from invalid context at emulate_instruction()

From: Paul Mackerras
Date: Thu Feb 23 2006 - 17:54:58 EST


Kumar Gala writes:

> Last time this was brought up we left it wondering why you had made
> program_check_exception() run with interrupts disabled. Any further
> ideas on that one?

I think it was so that if we are entering the kernel debugger, we do
so on the same cpu that the exception was generated on. This should
fix it.

Paul.

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7509aa6..98660ae 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -814,6 +814,8 @@ void __kprobes program_check_exception(s
return;
}

+ local_irq_enable();
+
/* Try to emulate it if we should. */
if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
switch (emulate_instruction(regs)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/