hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/nios2/kernel/traps.c
....@@ -26,7 +26,7 @@
2626
2727 static void _send_sig(int signo, int code, unsigned long addr)
2828 {
29
- force_sig_fault(signo, code, (void __user *) addr, current);
29
+ force_sig_fault(signo, code, (void __user *) addr);
3030 }
3131
3232 void die(const char *str, struct pt_regs *regs, long err)
....@@ -37,10 +37,10 @@
3737 show_regs(regs);
3838 spin_unlock_irq(&die_lock);
3939 /*
40
- * do_exit() should take care of panic'ing from an interrupt
40
+ * make_task_dead() should take care of panic'ing from an interrupt
4141 * context so we don't handle it here
4242 */
43
- do_exit(err);
43
+ make_task_dead(err);
4444 }
4545
4646 void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr)
....@@ -52,12 +52,13 @@
5252 }
5353
5454 /*
55
- * The show_stack is an external API which we do not use ourselves.
55
+ * The show_stack() is external API which we do not use ourselves.
5656 */
5757
5858 int kstack_depth_to_print = 48;
5959
60
-void show_stack(struct task_struct *task, unsigned long *stack)
60
+void show_stack(struct task_struct *task, unsigned long *stack,
61
+ const char *loglvl)
6162 {
6263 unsigned long *endstack, addr;
6364 int i;
....@@ -72,16 +73,16 @@
7273 addr = (unsigned long) stack;
7374 endstack = (unsigned long *) PAGE_ALIGN(addr);
7475
75
- pr_emerg("Stack from %08lx:", (unsigned long)stack);
76
+ printk("%sStack from %08lx:", loglvl, (unsigned long)stack);
7677 for (i = 0; i < kstack_depth_to_print; i++) {
7778 if (stack + 1 > endstack)
7879 break;
7980 if (i % 8 == 0)
80
- pr_emerg("\n ");
81
- pr_emerg(" %08lx", *stack++);
81
+ printk("%s\n ", loglvl);
82
+ printk("%s %08lx", loglvl, *stack++);
8283 }
8384
84
- pr_emerg("\nCall Trace:");
85
+ printk("%s\nCall Trace:", loglvl);
8586 i = 0;
8687 while (stack + 1 <= endstack) {
8788 addr = *stack++;
....@@ -97,11 +98,11 @@
9798 (addr <= (unsigned long) _etext))) {
9899 if (i % 4 == 0)
99100 pr_emerg("\n ");
100
- pr_emerg(" [<%08lx>]", addr);
101
+ printk("%s [<%08lx>]", loglvl, addr);
101102 i++;
102103 }
103104 }
104
- pr_emerg("\n");
105
+ printk("%s\n", loglvl);
105106 }
106107
107108 void __init trap_init(void)