Re: [PATCH/RFC] Change the program check exception from EXC_XFER_STD to EXC_XFER_EE.
From: Kumar Gala <hidden>
Date: 2007-01-26 19:50:30
On Dec 8, 2006, at 2:07 AM, Kumar Gala wrote:
On Fri, 8 Dec 2006, Paul Mackerras wrote:quoted
Kumar Gala writes:quoted
We don't need to rearrange anything, just put the local_irq_enable() call in do_mathemu(). If we are a debugger than REASON_TRAP will have to be set and we dont bother with do_mathemu() than. Do you think we should also move the local_irq_enable() that exists in the handler into emulate_instruction().I'd rather have the local_irq_enable() calls in program_check_exception() so they're all in one place, preferably with a comment explaining why they're there. Having an unpaired local_irq_enable in do_mathemu() would seem a bit weird to me.Ok, how about something like this, I'm a bit concerned about what effect moving the do_mathemu call will have on things like the 405. I'll put this in my tree with some other cleanup patches if it looks ok. - k
We never closed on this. - k
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index fde820e..63073f9 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c@@ -792,9 +792,12 @@ #ifdef CONFIG_MATH_EMULATION * hardware people - not sure if it can happen on any illegal * instruction or only on FP instructions, whether there is a * pattern to occurences etc. -dgibson 31/Mar/2003 */ - if (!(reason & REASON_TRAP) && do_mathemu(regs) == 0) { - emulate_single_step(regs); - return; + if (!(reason & REASON_TRAP)) { + local_irq_enable(); + if (do_mathemu(regs) == 0) { + emulate_single_step(regs); + return; + } } #endif /* CONFIG_MATH_EMULATION */_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev