aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/traps.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 05:22:14 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 05:22:14 -0400
commita6a31139897a5e539efe7ad3b7bd351fa9673ce8 (patch)
tree6e2ad11d93ab95214694038080c79284c6da30d6 /arch/sh/kernel/traps.c
parent2cb7ce3bb384f30a377f66336c78546b834604df (diff)
sh: Add support for 4K stacks.
This enables support for 4K stacks on SH. Currently this depends on DEBUG_KERNEL, but likely all boards will switch to this as the default in the future. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/traps.c')
-rw-r--r--arch/sh/kernel/traps.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 95c810b3c97e..c2c597e09482 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -741,20 +741,12 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
741 unsigned long module_end = VMALLOC_END; 741 unsigned long module_end = VMALLOC_END;
742 int i = 1; 742 int i = 1;
743 743
744 if (tsk && !sp) { 744 if (!tsk)
745 tsk = current;
746 if (tsk == current)
747 sp = (unsigned long *)current_stack_pointer;
748 else
745 sp = (unsigned long *)tsk->thread.sp; 749 sp = (unsigned long *)tsk->thread.sp;
746 }
747
748 if (!sp) {
749 __asm__ __volatile__ (
750 "mov r15, %0\n\t"
751 "stc r7_bank, %1\n\t"
752 : "=r" (module_start),
753 "=r" (module_end)
754 );
755
756 sp = (unsigned long *)module_start;
757 }
758 750
759 stack = sp; 751 stack = sp;
760 752