[PATCH/RFC] Change the program check exception from EXC_XFER_STD to EXC_XFER_EE.

Kumar Gala galak at kernel.crashing.org
Sat Jan 27 06:49:18 EST 2007


On Dec 8, 2006, at 2:07 AM, Kumar Gala wrote:

> On Fri, 8 Dec 2006, Paul Mackerras wrote:
>
>> Kumar Gala writes:
>>
>>> 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

> 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 at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev




More information about the Linuxppc-dev mailing list