diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-02-23 02:16:34 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-02-27 02:26:19 -0500 |
commit | 4f099ebb27211d378304ddcfa507097f5128f5b9 (patch) | |
tree | 5fdffb1e53b9c4b967eb86ada8eed14eafb763ff /arch/sh | |
parent | 1dd22722f6bf9be9821657a2d59fae4d4365fb32 (diff) |
sh: remove EXPEVT vector from stack on sh3/sh4/sh4a
Remove EXPEVT vector from the stack, lookup_exception_vector()
for sh3/sh4/sh4a is already using k2 to get the vector.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/entry.S | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index 12912ab80c15..81c6568fdb3e 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -122,14 +122,12 @@ extern void user_disable_single_step(struct task_struct *); | |||
122 | #ifdef CONFIG_SH_DSP | 122 | #ifdef CONFIG_SH_DSP |
123 | #define task_pt_regs(task) \ | 123 | #define task_pt_regs(task) \ |
124 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ | 124 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ |
125 | - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) | 125 | - sizeof(struct pt_dspregs)) - 1) |
126 | #define task_pt_dspregs(task) \ | 126 | #define task_pt_dspregs(task) \ |
127 | ((struct pt_dspregs *) (task_stack_page(task) + THREAD_SIZE \ | 127 | ((struct pt_dspregs *) (task_stack_page(task) + THREAD_SIZE) - 1) |
128 | - sizeof(unsigned long)) - 1) | ||
129 | #else | 128 | #else |
130 | #define task_pt_regs(task) \ | 129 | #define task_pt_regs(task) \ |
131 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ | 130 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1) |
132 | - sizeof(unsigned long)) - 1) | ||
133 | #endif | 131 | #endif |
134 | 132 | ||
135 | static inline unsigned long profile_pc(struct pt_regs *regs) | 133 | static inline unsigned long profile_pc(struct pt_regs *regs) |
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index cbffbffce351..0271fe08de27 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
@@ -312,7 +312,6 @@ skip_restore: | |||
312 | mov #0, k1 | 312 | mov #0, k1 |
313 | mov.b k1, @k0 | 313 | mov.b k1, @k0 |
314 | #endif | 314 | #endif |
315 | mov.l @r15+, k2 ! restore EXPEVT | ||
316 | mov k4, r15 | 315 | mov k4, r15 |
317 | rte | 316 | rte |
318 | nop | 317 | nop |
@@ -487,20 +486,18 @@ handle_exception_special: | |||
487 | .align L1_CACHE_SHIFT | 486 | .align L1_CACHE_SHIFT |
488 | 487 | ||
489 | ! save_regs() | 488 | ! save_regs() |
490 | ! - save vector, default tra, macl, mach, gbr, ssr, pr* and spc on the stack | 489 | ! - save default tra, macl, mach, gbr, ssr, pr* and spc on the stack |
491 | ! - save r15*, r14, r13, r12, r11, r10, r9, r8 on the stack | 490 | ! - save r15*, r14, r13, r12, r11, r10, r9, r8 on the stack |
492 | ! - switch bank | 491 | ! - switch bank |
493 | ! - save r7, r6, r5, r4, r3, r2, r1, r0 on the stack | 492 | ! - save r7, r6, r5, r4, r3, r2, r1, r0 on the stack |
494 | ! k0 contains original stack pointer* | 493 | ! k0 contains original stack pointer* |
495 | ! k1 trashed | 494 | ! k1 trashed |
496 | ! k2 passes vector (EXPEVT) | ||
497 | ! k3 passes original pr* | 495 | ! k3 passes original pr* |
498 | ! k4 trashed | 496 | ! k4 trashed |
499 | ! BL=1 on entry, on exit BL=0. | 497 | ! BL=1 on entry, on exit BL=0. |
500 | 498 | ||
501 | save_regs: | 499 | save_regs: |
502 | mov #-1, r1 | 500 | mov #-1, r1 |
503 | mov.l k2, @-r15 ! vector in k2 | ||
504 | mov.l k1, @-r15 ! set TRA (default: -1) | 501 | mov.l k1, @-r15 ! set TRA (default: -1) |
505 | sts.l macl, @-r15 | 502 | sts.l macl, @-r15 |
506 | sts.l mach, @-r15 | 503 | sts.l mach, @-r15 |