forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/h8300/kernel/traps.c
....@@ -115,7 +115,7 @@
115115
116116 static int kstack_depth_to_print = 24;
117117
118
-void show_stack(struct task_struct *task, unsigned long *esp)
118
+void show_stack(struct task_struct *task, unsigned long *esp, const char *loglvl)
119119 {
120120 unsigned long *stack, addr;
121121 int i;
....@@ -125,17 +125,17 @@
125125
126126 stack = esp;
127127
128
- pr_info("Stack from %08lx:", (unsigned long)stack);
128
+ printk("%sStack from %08lx:", loglvl, (unsigned long)stack);
129129 for (i = 0; i < kstack_depth_to_print; i++) {
130130 if (((unsigned long)stack & (THREAD_SIZE - 1)) >=
131131 THREAD_SIZE-4)
132132 break;
133133 if (i % 8 == 0)
134
- pr_info(" ");
134
+ printk("%s ", loglvl);
135135 pr_cont(" %08lx", *stack++);
136136 }
137137
138
- pr_info("\nCall Trace:\n");
138
+ printk("%s\nCall Trace:\n", loglvl);
139139 i = 0;
140140 stack = esp;
141141 while (((unsigned long)stack & (THREAD_SIZE - 1)) < THREAD_SIZE-4) {
....@@ -150,10 +150,10 @@
150150 */
151151 if (check_kernel_text(addr)) {
152152 if (i % 4 == 0)
153
- pr_info(" ");
153
+ printk("%s ", loglvl);
154154 pr_cont(" [<%08lx>]", addr);
155155 i++;
156156 }
157157 }
158
- pr_info("\n");
158
+ printk("%s\n", loglvl);
159159 }