* [PATCH] FRV: Correctly determine the address of an illegal instruction
@ 2008-04-14 10:20 David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2008-04-14 10:20 UTC (permalink / raw)
To: torvalds, akpm, viro; +Cc: dhowells, linux-kernel
From: David Howells <dhowells@redhat.com>
Correctly determine the address of an illegal instruction. The EPCR0 register
holds this value (masked by EPCR0_PC) if the validity bit is set (masked by
EPCR0_V). So the test as to whether the contents of the register are usable
should be involve checking the _V bit, not the _PC bits.
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/frv/kernel/traps.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c
index 2f7e668..7089c24 100644
--- a/arch/frv/kernel/traps.c
+++ b/arch/frv/kernel/traps.c
@@ -73,7 +73,7 @@ asmlinkage void illegal_instruction(unsigned long esfr1, unsigned long epcr0, un
epcr0, esr0, esfr1);
info.si_errno = 0;
- info.si_addr = (void *) ((epcr0 & EPCR0_PC) ? (epcr0 & EPCR0_PC) : __frame->pc);
+ info.si_addr = (void *) ((epcr0 & EPCR0_V) ? (epcr0 & EPCR0_PC) : __frame->pc);
switch (__frame->tbr & TBR_TT) {
case TBR_TT_ILLEGAL_INSTR:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-14 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-14 10:20 [PATCH] FRV: Correctly determine the address of an illegal instruction David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®