Commit 4dfe3e6c authored by David S. Miller's avatar David S. Miller

[SPARC]: Add die_counter changes.

parent d8248c68
...@@ -89,6 +89,7 @@ void instruction_dump (unsigned long *pc) ...@@ -89,6 +89,7 @@ void instruction_dump (unsigned long *pc)
void die_if_kernel(char *str, struct pt_regs *regs) void die_if_kernel(char *str, struct pt_regs *regs)
{ {
static int die_counter;
int count = 0; int count = 0;
/* Amuse the user. */ /* Amuse the user. */
...@@ -98,7 +99,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) ...@@ -98,7 +99,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
" /_| \\__/ |_\\\n" " /_| \\__/ |_\\\n"
" \\__U_/\n"); " \\__U_/\n");
printk("%s(%d): %s\n", current->comm, current->pid, str); printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter);
show_regs(regs); show_regs(regs);
__SAVE; __SAVE; __SAVE; __SAVE; __SAVE; __SAVE; __SAVE; __SAVE;
......
...@@ -1599,6 +1599,7 @@ void show_trace_task(struct task_struct *tsk) ...@@ -1599,6 +1599,7 @@ void show_trace_task(struct task_struct *tsk)
void die_if_kernel(char *str, struct pt_regs *regs) void die_if_kernel(char *str, struct pt_regs *regs)
{ {
static int die_counter;
extern void __show_regs(struct pt_regs * regs); extern void __show_regs(struct pt_regs * regs);
extern void smp_report_regs(void); extern void smp_report_regs(void);
int count = 0; int count = 0;
...@@ -1611,7 +1612,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) ...@@ -1611,7 +1612,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
" /_| \\__/ |_\\\n" " /_| \\__/ |_\\\n"
" \\__U_/\n"); " \\__U_/\n");
printk("%s(%d): %s\n", current->comm, current->pid, str); printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter);
__asm__ __volatile__("flushw"); __asm__ __volatile__("flushw");
__show_regs(regs); __show_regs(regs);
if (regs->tstate & TSTATE_PRIV) { if (regs->tstate & TSTATE_PRIV) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment