aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2006-12-11 19:11:45 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-12-11 19:11:45 -0500
commite9cfc147df99790a7d260e9d20b865fa31ec56da (patch)
tree97a7428d70e2c6afe81a084a929ac15999e8ed13 /arch
parentb641fe016a29fe2c0c7b0d717a5918e3f067a44f (diff)
sh: Fixup SH-2 BUG() trap handling.
This adds in support for the BUG() trap on SH-2. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S32
1 files changed, 14 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index 34d51b3745ea..d51fa5e9904a 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -177,15 +177,21 @@ interrupt_entry:
1777: .long do_IRQ 1777: .long do_IRQ
1788: .long do_exception_error 1788: .long do_exception_error
179 179
180trap_entry: 180trap_entry:
181 add #-0x10,r9 181 /* verbose BUG trapa entry check */
182 mov #0x3e,r8
183 cmp/ge r8,r9
184 bf/s 1f
185 add #-0x10,r9
186 add #0x10,r9
1871:
182 shll2 r9 ! TRA 188 shll2 r9 ! TRA
183 mov #OFF_TRA,r8 189 mov #OFF_TRA,r8
184 add r15,r8 190 add r15,r8
185 mov.l r9,@r8 191 mov.l r9,@r8
186 mov r9,r8 192 mov r9,r8
187#ifdef CONFIG_TRACE_IRQFLAGS 193#ifdef CONFIG_TRACE_IRQFLAGS
188 mov.l 5f, r9 194 mov.l 2f, r9
189 jsr @r9 195 jsr @r9
190 nop 196 nop
191#endif 197#endif
@@ -194,12 +200,8 @@ trap_entry:
194 nop 200 nop
195 201
196 .align 2 202 .align 2
1971: .long syscall_exit
1982: .long break_point_trap_software
1993: .long NR_syscalls
2004: .long sys_call_table
201#ifdef CONFIG_TRACE_IRQFLAGS 203#ifdef CONFIG_TRACE_IRQFLAGS
2025: .long trace_hardirqs_on 2042: .long trace_hardirqs_on
203#endif 205#endif
204 206
205#if defined(CONFIG_SH_STANDARD_BIOS) 207#if defined(CONFIG_SH_STANDARD_BIOS)
@@ -264,7 +266,7 @@ ENTRY(address_error_handler)
264restore_all: 266restore_all:
265 cli 267 cli
266#ifdef CONFIG_TRACE_IRQFLAGS 268#ifdef CONFIG_TRACE_IRQFLAGS
267 mov.l 3f, r0 269 mov.l 1f, r0
268 jsr @r0 270 jsr @r0
269 nop 271 nop
270#endif 272#endif
@@ -309,20 +311,14 @@ restore_all:
309 mov.l @r15,r15 311 mov.l @r15,r15
310 rte 312 rte
311 nop 313 nop
3122:
313 mov.l 1f,r8
314 mov.l 2f,r9
315 jmp @r9
316 lds r8,pr
317 314
318 .align 2 315#ifdef CONFIG_TRACE_IRQFLAGS
3161: .long trace_hardirqs_off
317#endif
319$current_thread_info: 318$current_thread_info:
320 .long __current_thread_info 319 .long __current_thread_info
321$cpu_mode: 320$cpu_mode:
322 .long __cpu_mode 321 .long __cpu_mode
323#ifdef CONFIG_TRACE_IRQFLAGS
3243: .long trace_hardirqs_off
325#endif
326 322
327! common exception handler 323! common exception handler
328#include "../../entry-common.S" 324#include "../../entry-common.S"