aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2008-11-18 15:25:17 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-03-16 14:10:40 -0400
commitcf6da575ad8d86afa591dd78114067bbff448c36 (patch)
treedbad200525a7db07121499f42e2ea765ff4a120a /arch/m68k
parentf67080884a81f58cf95e25c284e30cbed21122a3 (diff)
m68k: Allow all kernel traps to be handled via exception fixups
This will be needed by the ARAnyM Native Feature initialization code. Also document that the VEC_TRACE check is needed for 68020/30. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/traps.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index cd802d49f7e9..4022bbc28878 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -58,6 +58,7 @@ asm(".text\n"
58/* 58/*
59 * this must be called very early as the kernel might 59 * this must be called very early as the kernel might
60 * use some instruction that are emulated on the 060 60 * use some instruction that are emulated on the 060
61 * and so we're prepared for early probe attempts (e.g. nf_init).
61 */ 62 */
62void __init base_trap_init(void) 63void __init base_trap_init(void)
63{ 64{
@@ -78,6 +79,7 @@ void __init base_trap_init(void)
78 } 79 }
79 80
80 vectors[VEC_BUSERR] = buserr; 81 vectors[VEC_BUSERR] = buserr;
82 vectors[VEC_ILLEGAL] = trap;
81 vectors[VEC_SYS] = system_call; 83 vectors[VEC_SYS] = system_call;
82} 84}
83 85
@@ -1055,9 +1057,11 @@ asmlinkage void trap_c(struct frame *fp)
1055 siginfo_t info; 1057 siginfo_t info;
1056 1058
1057 if (fp->ptregs.sr & PS_S) { 1059 if (fp->ptregs.sr & PS_S) {
1058 if ((fp->ptregs.vector >> 2) == VEC_TRACE) { 1060 if (fp->ptregs.vector == VEC_TRACE << 2) {
1059 /* traced a trapping instruction */ 1061 /* traced a trapping instruction on a 68020/30,
1060 } else 1062 * real exception will be executed afterwards.
1063 */
1064 } else if (!handle_kernel_fault(&fp->ptregs))
1061 bad_super_trap(fp); 1065 bad_super_trap(fp);
1062 return; 1066 return;
1063 } 1067 }