Skip to content

Commit

Permalink
FRV: Correctly determine the address of an illegal instruction
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Apr 14, 2008
1 parent 120dd64 commit 4f3f8e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/frv/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4f3f8e9

Please sign in to comment.