From: Kumar Gala <galak@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH/RFC] Change the program check exception from EXC_XFER_STD to EXC_XFER_EE.
Date: Fri, 8 Dec 2006 02:07:14 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612080205420.16331@gate.crashing.org> (raw)
In-Reply-To: <17784.59774.968517.908414@cargo.ozlabs.ibm.com>
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
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 */
next prev parent reply other threads:[~2006-12-08 8:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 21:50 [PATCH/RFC] Change the program check exception from EXC_XFER_STD to EXC_XFER_EE Scott Wood
2006-12-06 21:59 ` Kumar Gala
2006-12-06 22:09 ` Paul Mackerras
2006-12-06 22:15 ` Kumar Gala
2006-12-08 4:26 ` Paul Mackerras
2006-12-08 8:07 ` Kumar Gala [this message]
2007-01-26 6:48 ` Kumar Gala
2007-01-26 19:49 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0612080205420.16331@gate.crashing.org \
--to=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).