aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-08 01:50:59 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-05-08 21:35:01 -0400
commitbd0799977cb9b68aa6a39e9630aeea4778a58385 (patch)
tree125c0c923701c5b6f823a7b614c295e06370d46c /arch/sh/kernel/process.c
parent51c8b856f5edfa45d956721aa6d6ebaa15699062 (diff)
sh: Support for SH-2A 32-bit opcodes.
SH-2A supports both 16 and 32-bit instructions, add a simple helper for figuring out the instruction size in the places where there are hardcoded 16-bit assumptions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 4688b890aef8..209cc9b42186 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -19,6 +19,7 @@
19#include <asm/uaccess.h> 19#include <asm/uaccess.h>
20#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
21#include <asm/pgalloc.h> 21#include <asm/pgalloc.h>
22#include <asm/system.h>
22#include <asm/ubc.h> 23#include <asm/ubc.h>
23 24
24static int hlt_counter; 25static int hlt_counter;
@@ -497,7 +498,7 @@ asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5,
497 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 498 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
498 499
499 /* Rewind */ 500 /* Rewind */
500 regs->pc -= 2; 501 regs->pc -= instruction_size(regs->pc);
501 502
502 if (notify_die(DIE_TRAP, regs, regs->tra & 0xff, 503 if (notify_die(DIE_TRAP, regs, regs->tra & 0xff,
503 SIGTRAP) == NOTIFY_STOP) 504 SIGTRAP) == NOTIFY_STOP)
@@ -516,7 +517,7 @@ asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5,
516 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 517 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
517 518
518 /* Rewind */ 519 /* Rewind */
519 regs->pc -= 2; 520 regs->pc -= instruction_size(regs->pc);
520 521
521 if (notify_die(DIE_TRAP, regs, TRAPA_BUG_OPCODE & 0xff, 522 if (notify_die(DIE_TRAP, regs, TRAPA_BUG_OPCODE & 0xff,
522 SIGTRAP) == NOTIFY_STOP) 523 SIGTRAP) == NOTIFY_STOP)