aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2005-09-01 20:42:52 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-02 03:57:30 -0400
commitdb81fb8486563573aca023dac30a2d70c46855e8 (patch)
treeb86af0ec7bb953ae45f3e47627b6580227d14f00 /arch/m68knommu
parent5d052c170e9a7ac0c7d58fe4fbf39fca3c24f2cc (diff)
[PATCH] m68knommu: cleanup showstack()
Make show_stack() consistent with other architectures. Put the vector string names in the .rodata section. Patch originally submitted by Philippe De Muyter <phdm@macqel.be>. Signed-off-by: Greg Ungerer <gerg@uclinux.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/kernel/traps.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index ad7dc6347f19..5bc068462864 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -21,6 +21,7 @@
21#include <linux/signal.h> 21#include <linux/signal.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/module.h>
24#include <linux/types.h> 25#include <linux/types.h>
25#include <linux/a.out.h> 26#include <linux/a.out.h>
26#include <linux/user.h> 27#include <linux/user.h>
@@ -38,7 +39,7 @@
38#include <asm/machdep.h> 39#include <asm/machdep.h>
39#include <asm/siginfo.h> 40#include <asm/siginfo.h>
40 41
41static char *vec_names[] = { 42static char const * const vec_names[] = {
42 "RESET SP", "RESET PC", "BUS ERROR", "ADDRESS ERROR", 43 "RESET SP", "RESET PC", "BUS ERROR", "ADDRESS ERROR",
43 "ILLEGAL INSTRUCTION", "ZERO DIVIDE", "CHK", "TRAPcc", 44 "ILLEGAL INSTRUCTION", "ZERO DIVIDE", "CHK", "TRAPcc",
44 "PRIVILEGE VIOLATION", "TRACE", "LINE 1010", "LINE 1111", 45 "PRIVILEGE VIOLATION", "TRACE", "LINE 1010", "LINE 1111",
@@ -106,17 +107,20 @@ asmlinkage void buserr_c(struct frame *fp)
106 107
107int kstack_depth_to_print = 48; 108int kstack_depth_to_print = 48;
108 109
109void show_stack(struct task_struct *task, unsigned long *esp) 110void show_stack(struct task_struct *task, unsigned long *stack)
110{ 111{
111 unsigned long *stack, *endstack, addr; 112 unsigned long *endstack, addr;
112 extern char _start, _etext; 113 extern char _start, _etext;
113 int i; 114 int i;
114 115
115 if (esp == NULL) 116 if (!stack) {
116 esp = (unsigned long *) &esp; 117 if (task)
118 stack = (unsigned long *)task->thread.ksp;
119 else
120 stack = (unsigned long *)&stack;
121 }
117 122
118 stack = esp; 123 addr = (unsigned long) stack;
119 addr = (unsigned long) esp;
120 endstack = (unsigned long *) PAGE_ALIGN(addr); 124 endstack = (unsigned long *) PAGE_ALIGN(addr);
121 125
122 printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack); 126 printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack);
@@ -306,6 +310,8 @@ void dump_stack(void)
306 show_stack(current, &stack); 310 show_stack(current, &stack);
307} 311}
308 312
313EXPORT_SYMBOL(dump_stack);
314
309#ifdef CONFIG_M68KFPU_EMU 315#ifdef CONFIG_M68KFPU_EMU
310asmlinkage void fpemu_signal(int signal, int code, void *addr) 316asmlinkage void fpemu_signal(int signal, int code, void *addr)
311{ 317{