diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:44:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:44:35 -0400 |
commit | ebc283118ee448dcb6e6cae74a8a43f17a1ccc3f (patch) | |
tree | daeb82c70de678ac10a5cec153097294dd772cb1 /arch/mips/kernel/traps.c | |
parent | fc8a327db6c46de783b1a4276d846841b9abc24c (diff) | |
parent | 8bb00d83d8fc2de5c0614f5d55780107e0c375fe (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Increase cp0 compare clockevent min_delta_ns from 0x30 to 0x300.
[MIPS] Cache: Provide more information on cache policy on bootup.
[MIPS] Fix aliasing bug in copy_user_highpage, take 2.
[MIPS] VPE loader: convert from struct class_ device to struct device
[MIPS] MIPSsim: Fix booting from NFS root
[MIPS] Alchemy: Get rid of au1xxx_irq_map_t.
[MIPS] Alchemy: Get rid of au_ffz().
[MIPS] Alchemy: Get rid of au_ffs().
[MIPS] Alchemy: cleanup interrupt code.
[MIPS] Lasat: Fix build by conversion to irq_cpu.c.
[MIPS] Lasat: Add #ifndef ... #endif include warpper to lasatint.h.
[MIPS] IP22: Enable -Werror.
[MIPS] IP22: Fix warning.
[MIPS] IP22: Complain if requesting the front panel irq failed.
[MIPS] vmlinux.lds.S: Handle KPROBES_TEXT.
[MIPS] vmlinux.lds.S: Fix handling of .notes in final link.
[MIPS] vmlinux.lds.S: Remove duplicate comment.
[MIPS] MSP71XX: Add workarounds file.
[MIPS] IP32: Fix build by conversion to irq_cpu.c.
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 632bce1bf420..9c0c478d71ac 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -104,7 +104,7 @@ static int __init set_raw_show_trace(char *str) | |||
104 | __setup("raw_show_trace", set_raw_show_trace); | 104 | __setup("raw_show_trace", set_raw_show_trace); |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | static void show_backtrace(struct task_struct *task, struct pt_regs *regs) | 107 | static void show_backtrace(struct task_struct *task, const struct pt_regs *regs) |
108 | { | 108 | { |
109 | unsigned long sp = regs->regs[29]; | 109 | unsigned long sp = regs->regs[29]; |
110 | unsigned long ra = regs->regs[31]; | 110 | unsigned long ra = regs->regs[31]; |
@@ -126,7 +126,8 @@ static void show_backtrace(struct task_struct *task, struct pt_regs *regs) | |||
126 | * This routine abuses get_user()/put_user() to reference pointers | 126 | * This routine abuses get_user()/put_user() to reference pointers |
127 | * with at least a bit of error checking ... | 127 | * with at least a bit of error checking ... |
128 | */ | 128 | */ |
129 | static void show_stacktrace(struct task_struct *task, struct pt_regs *regs) | 129 | static void show_stacktrace(struct task_struct *task, |
130 | const struct pt_regs *regs) | ||
130 | { | 131 | { |
131 | const int field = 2 * sizeof(unsigned long); | 132 | const int field = 2 * sizeof(unsigned long); |
132 | long stackdata; | 133 | long stackdata; |
@@ -203,7 +204,7 @@ static void show_code(unsigned int __user *pc) | |||
203 | } | 204 | } |
204 | } | 205 | } |
205 | 206 | ||
206 | void show_regs(struct pt_regs *regs) | 207 | static void __show_regs(const struct pt_regs *regs) |
207 | { | 208 | { |
208 | const int field = 2 * sizeof(unsigned long); | 209 | const int field = 2 * sizeof(unsigned long); |
209 | unsigned int cause = regs->cp0_cause; | 210 | unsigned int cause = regs->cp0_cause; |
@@ -299,9 +300,17 @@ void show_regs(struct pt_regs *regs) | |||
299 | cpu_name_string()); | 300 | cpu_name_string()); |
300 | } | 301 | } |
301 | 302 | ||
302 | void show_registers(struct pt_regs *regs) | 303 | /* |
304 | * FIXME: really the generic show_regs should take a const pointer argument. | ||
305 | */ | ||
306 | void show_regs(struct pt_regs *regs) | ||
307 | { | ||
308 | __show_regs((struct pt_regs *)regs); | ||
309 | } | ||
310 | |||
311 | void show_registers(const struct pt_regs *regs) | ||
303 | { | 312 | { |
304 | show_regs(regs); | 313 | __show_regs(regs); |
305 | print_modules(); | 314 | print_modules(); |
306 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", | 315 | printk("Process %s (pid: %d, threadinfo=%p, task=%p)\n", |
307 | current->comm, current->pid, current_thread_info(), current); | 316 | current->comm, current->pid, current_thread_info(), current); |
@@ -312,7 +321,7 @@ void show_registers(struct pt_regs *regs) | |||
312 | 321 | ||
313 | static DEFINE_SPINLOCK(die_lock); | 322 | static DEFINE_SPINLOCK(die_lock); |
314 | 323 | ||
315 | void __noreturn die(const char * str, struct pt_regs * regs) | 324 | void __noreturn die(const char * str, const struct pt_regs * regs) |
316 | { | 325 | { |
317 | static int die_counter; | 326 | static int die_counter; |
318 | #ifdef CONFIG_MIPS_MT_SMTC | 327 | #ifdef CONFIG_MIPS_MT_SMTC |