hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/c6x/kernel/traps.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Port on Texas Instruments TMS320C6x architecture
34 *
45 * Copyright (C) 2004, 2006, 2009, 2010, 2011 Texas Instruments Incorporated
56 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118 #include <linux/module.h>
129 #include <linux/ptrace.h>
....@@ -253,7 +250,7 @@
253250 die_if_kernel(except_info->kernel_str, regs, addr);
254251
255252 force_sig_fault(except_info->signo, except_info->code,
256
- (void __user *)addr, current);
253
+ (void __user *)addr);
257254 }
258255
259256 /*
....@@ -347,12 +344,13 @@
347344
348345 static int kstack_depth_to_print = 48;
349346
350
-static void show_trace(unsigned long *stack, unsigned long *endstack)
347
+static void show_trace(unsigned long *stack, unsigned long *endstack,
348
+ const char *loglvl)
351349 {
352350 unsigned long addr;
353351 int i;
354352
355
- pr_debug("Call trace:");
353
+ printk("%sCall trace:", loglvl);
356354 i = 0;
357355 while (stack + 1 <= endstack) {
358356 addr = *stack++;
....@@ -367,16 +365,17 @@
367365 if (__kernel_text_address(addr)) {
368366 #ifndef CONFIG_KALLSYMS
369367 if (i % 5 == 0)
370
- pr_debug("\n ");
368
+ printk("%s\n ", loglvl);
371369 #endif
372
- pr_debug(" [<%08lx>] %pS\n", addr, (void *)addr);
370
+ printk("%s [<%08lx>] %pS\n", loglvl, addr, (void *)addr);
373371 i++;
374372 }
375373 }
376
- pr_debug("\n");
374
+ printk("%s\n", loglvl);
377375 }
378376
379
-void show_stack(struct task_struct *task, unsigned long *stack)
377
+void show_stack(struct task_struct *task, unsigned long *stack,
378
+ const char *loglvl)
380379 {
381380 unsigned long *p, *endstack;
382381 int i;
....@@ -401,7 +400,7 @@
401400 pr_cont(" %08lx", *p++);
402401 }
403402 pr_cont("\n");
404
- show_trace(stack, endstack);
403
+ show_trace(stack, endstack, loglvl);
405404 }
406405
407406 int is_valid_bugaddr(unsigned long addr)