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

Paul Mackerras paulus at samba.org
Fri Feb 24 09:57:12 EST 2006


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)) {



More information about the Linuxppc-dev mailing list