kernel: rename show_stack_loglvl() => show_stack()
authorDmitry Safonov <dima@arista.com>
Tue, 9 Jun 2020 04:32:29 +0000 (21:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 16:39:13 +0000 (09:39 -0700)
Now the last users of show_stack() got converted to use an explicit log
level, show_stack_loglvl() can drop it's redundant suffix and become once
again well known show_stack().

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200418201944.482088-51-dima@arista.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
39 files changed:
arch/alpha/kernel/traps.c
arch/arc/kernel/stacktrace.c
arch/arm/kernel/traps.c
arch/arm64/kernel/traps.c
arch/c6x/kernel/traps.c
arch/csky/kernel/ptrace.c
arch/csky/kernel/stacktrace.c
arch/h8300/kernel/traps.c
arch/hexagon/kernel/traps.c
arch/ia64/kernel/mca.c
arch/ia64/kernel/process.c
arch/m68k/kernel/traps.c
arch/microblaze/kernel/traps.c
arch/mips/kernel/traps.c
arch/nds32/kernel/traps.c
arch/nios2/kernel/traps.c
arch/openrisc/kernel/traps.c
arch/parisc/kernel/traps.c
arch/powerpc/kernel/process.c
arch/powerpc/kernel/stacktrace.c
arch/riscv/kernel/stacktrace.c
arch/s390/kernel/dumpstack.c
arch/sh/kernel/dumpstack.c
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_64.c
arch/sparc/kernel/traps_64.c
arch/um/drivers/mconsole_kern.c
arch/um/kernel/sysrq.c
arch/unicore32/kernel/traps.c
arch/x86/kernel/amd_gart_64.c
arch/x86/kernel/dumpstack.c
arch/xtensa/kernel/traps.c
drivers/base/power/main.c
drivers/tty/sysrq.c
include/linux/sched/debug.h
kernel/debug/kdb/kdb_bt.c
kernel/locking/rtmutex-debug.c
kernel/sched/core.c
lib/dump_stack.c

index 2402f1777f54ee2deee5b06598bce9d532eea828..8383ccfaccdc235e257f12f56b684122c0028e3a 100644 (file)
@@ -144,8 +144,7 @@ dik_show_trace(unsigned long *sp, const char *loglvl)
 
 static int kstack_depth_to_print = 24;
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                       const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        unsigned long *stack;
        int i;
@@ -174,11 +173,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
        dik_show_trace(sp, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 void
 die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
 {
index 24f9cd8a12c94f0abc06cffc4149ee15396905b7..feba91c9d969cae7a86afb4daba599c26a098290 100644 (file)
@@ -228,17 +228,11 @@ noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs,
 EXPORT_SYMBOL(show_stacktrace);
 
 /* Expected by sched Code */
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
-                       const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 {
        show_stacktrace(tsk, NULL, loglvl);
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
-       show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
 /* Another API expected by schedular, shows up in "ps" as Wait Channel
  * Of course just returning schedule( ) would be pointless so unwind until
  * the function is not in schedular code
index 2ae2c23799ada78b9e1456dd810508e6f831cfd2..65a3b1e7548023948ea8d208b9872e24d74ed031 100644 (file)
@@ -247,18 +247,12 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
 }
 #endif
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 {
        dump_backtrace(NULL, tsk, loglvl);
        barrier();
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
-       show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
 #ifdef CONFIG_PREEMPT
 #define S_PREEMPT " PREEMPT"
 #elif defined(CONFIG_PREEMPT_RT)
index 3621868b2fcc81729c1c9e34a78fe053420a5046..3fd9e2731e0dd994c6fa4b20b1d06cacea07a2e5 100644 (file)
@@ -137,18 +137,12 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
        put_task_stack(tsk);
 }
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 {
        dump_backtrace(NULL, tsk, loglvl);
        barrier();
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
-       show_stack_loglvl(tsk, sp, KERN_DEFAULT);
-}
-
 #ifdef CONFIG_PREEMPT
 #define S_PREEMPT " PREEMPT"
 #elif defined(CONFIG_PREEMPT_RT)
index 4afbf48f1ce00417ff18d962e4b11c8f3da93901..2b9121c755be17b479f10c952bffc74c37e70bd8 100644 (file)
@@ -374,7 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack,
        printk("%s\n", loglvl);
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
                const char *loglvl)
 {
        unsigned long *p, *endstack;
@@ -403,11 +403,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
        show_trace(stack, endstack, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
-       show_stack_loglvl(task, stack, KERN_DEBUG);
-}
-
 int is_valid_bugaddr(unsigned long addr)
 {
        return __kernel_text_address(addr);
index 5a82230bddf988409bbb4e0640ebe95cb003b537..bbd801f86eb57fb6c57bc289b1734e1c628f8b18 100644 (file)
@@ -344,7 +344,7 @@ asmlinkage void syscall_trace_exit(struct pt_regs *regs)
                trace_sys_exit(regs, syscall_get_return_value(current, regs));
 }
 
-extern void show_stack(struct task_struct *task, unsigned long *stack);
+extern void show_stack(struct task_struct *task, unsigned long *stack, const char *loglvl);
 void show_regs(struct pt_regs *fp)
 {
        unsigned long   *sp;
@@ -420,6 +420,6 @@ void show_regs(struct pt_regs *fp)
        }
        pr_cont("\n");
 
-       show_stack(NULL, (unsigned long *)fp->regs[4]);
+       show_stack(NULL, (unsigned long *)fp->regs[4], KERN_INFO);
        return;
 }
index ca135f13cc1383f01ae0d728dfa6319e78a95f99..16ae20a0af3421e5cf7ccb1f3ca30730672668c0 100644 (file)
@@ -95,19 +95,12 @@ static bool print_trace_address(unsigned long pc, void *arg)
        return false;
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        pr_cont("Call Trace:\n");
        walk_stackframe(task, NULL, print_trace_address, (void *)loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       pr_cont("Call Trace:\n");
-       walk_stackframe(task, NULL, print_trace_address, KERN_INFO);
-}
-
 static bool save_wchan(unsigned long pc, void *arg)
 {
        if (!in_sched_functions(pc)) {
index 6362446563d6abf36c9b54189b4b2cbd94e3106d..5d8b969cd8f3496d3975ef43922371ca14c5a0f5 100644 (file)
@@ -115,8 +115,7 @@ void die(const char *str, struct pt_regs *fp, unsigned long err)
 
 static int kstack_depth_to_print = 24;
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *esp, const char *loglvl)
 {
        unsigned long *stack,  addr;
        int i;
@@ -158,8 +157,3 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
        }
        printk("%s\n", loglvl);
 }
-
-void show_stack(struct task_struct *task, unsigned long *esp)
-{
-       show_stack_loglvl(task, esp, KERN_INFO);
-}
index a8a3a210d7810cd0856e3a70bb11939102c5ef87..904134b37232f38ab05c1a18a127b70c1118d9a9 100644 (file)
@@ -175,18 +175,12 @@ static void do_show_stack(struct task_struct *task, unsigned long *fp,
        }
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *fp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *fp, const char *loglvl)
 {
        /* Saved link reg is one word above FP */
        do_show_stack(task, fp, 0, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *fp)
-{
-       show_stack_loglvl(task, fp, 0, KERN_INFO);
-}
-
 int die(const char *str, struct pt_regs *regs, long err)
 {
        static struct {
index 6fb54dfa1350da3cf72b82b9aecfaa7cb7da80d2..2703f7795672dfadf40b262df561a8e13b58fd87 100644 (file)
@@ -1631,7 +1631,7 @@ default_monarch_init_process(struct notifier_block *self, unsigned long val, voi
        if (read_trylock(&tasklist_lock)) {
                do_each_thread (g, t) {
                        printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
-                       show_stack(t, NULL);
+                       show_stack(t, NULL, KERN_DEFAULT);
                } while_each_thread (g, t);
                read_unlock(&tasklist_lock);
        }
index 913d9a01cbf9b3430d7009038060eb836a9a9666..96dfb9e4b16fbd9a17a0f604a070bbae5495034d 100644 (file)
@@ -85,8 +85,7 @@ ia64_do_show_stack (struct unw_frame_info *info, void *arg)
 }
 
 void
-show_stack_loglvl (struct task_struct *task, unsigned long *sp,
-                  const char *loglvl)
+show_stack (struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        if (!task)
                unw_init_running(ia64_do_show_stack, (void *)loglvl);
@@ -98,12 +97,6 @@ show_stack_loglvl (struct task_struct *task, unsigned long *sp,
        }
 }
 
-void
-show_stack (struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 void
 show_regs (struct pt_regs *regs)
 {
@@ -158,7 +151,7 @@ show_regs (struct pt_regs *regs)
                               ((i == sof - 1) || (i % 3) == 2) ? "\n" : " ");
                }
        } else
-               show_stack(NULL, NULL);
+               show_stack(NULL, NULL, KERN_DEFAULT);
 }
 
 /* local support for deprecated console_print */
index ffcc5ec4fac3b40f88a5b041d379c9c205f4cc62..df6fc782754f73dd0c7597420d724bdab35d8a43 100644 (file)
@@ -916,7 +916,7 @@ void show_registers(struct pt_regs *regs)
        default:
                pr_cont("\n");
        }
-       show_stack(NULL, (unsigned long *)addr);
+       show_stack(NULL, (unsigned long *)addr, KERN_INFO);
 
        pr_info("Code:");
        set_fs(KERNEL_DS);
@@ -935,8 +935,8 @@ void show_registers(struct pt_regs *regs)
        pr_cont("\n");
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *stack,
+               const char *loglvl)
 {
        unsigned long *p;
        unsigned long *endstack;
@@ -963,11 +963,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
        show_trace(stack, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
-       show_stack_loglvl(task, stack, KERN_INFO);
-}
-
 /*
  * The vector number returned in the frame pointer may also contain
  * the "fs" (Fault Status) bits on ColdFire. These are in the bottom
index 149ae534937efbac87e557192128d069f502939c..94b6fe93147d5a9644c4694ca8127637dbebcf25 100644 (file)
@@ -31,8 +31,7 @@ static int __init kstack_setup(char *s)
 }
 __setup("kstack=", kstack_setup);
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        unsigned long words_to_show;
        u32 fp = (u32) sp;
@@ -77,8 +76,3 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
 
        debug_show_held_locks(task);
 }
-
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_INFO);
-}
index e49040739b61d5a77d5ab4dce63aa91e16c63082..320797bd03f6428fe4fc5811857192fa5e3e189c 100644 (file)
@@ -198,8 +198,7 @@ static void show_stacktrace(struct task_struct *task,
        show_backtrace(task, regs, loglvl);
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        struct pt_regs regs;
        mm_segment_t old_fs = get_fs();
@@ -227,11 +226,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
        set_fs(old_fs);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT)
-}
-
 static void show_code(unsigned int __user *pc)
 {
        long i;
index 90f12582c218a74fd0c6ce89f0f56c7b72bf557e..6a9772ba73927696c05d5a866ef08696bd7c2bba 100644 (file)
@@ -135,8 +135,7 @@ static void __dump(struct task_struct *tsk, unsigned long *base_reg,
        printk("%s\n", loglvl);
 }
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 {
        unsigned long *base_reg;
 
@@ -157,11 +156,6 @@ void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
        barrier();
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
-       show_stack_loglvl(tsk, sp, KERN_EMERG);
-}
-
 DEFINE_SPINLOCK(die_lock);
 
 /*
index 08071caa9b36fab79c9d7314a995b3ab65d6e6ed..b172da4eb1a9522784040d211f794ebef44f4419 100644 (file)
@@ -52,14 +52,13 @@ void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr)
 }
 
 /*
- * The show_stack(), show_stack_loglvl() are external API
- * which we do not use ourselves.
+ * The show_stack() is external API which we do not use ourselves.
  */
 
 int kstack_depth_to_print = 48;
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *stack,
+               const char *loglvl)
 {
        unsigned long *endstack, addr;
        int i;
@@ -106,11 +105,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
        printk("%s\n", loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
-       show_stack_loglvl(task, stack, KERN_EMERG);
-}
-
 void __init trap_init(void)
 {
        /* Nothing to do here */
index 3b7978a22d68543a5310e36f6445175dfeed005c..3022b0ad142cc1917628907f2f1523a2a7db184f 100644 (file)
@@ -48,8 +48,7 @@ void print_trace(void *data, unsigned long addr, int reliable)
 }
 
 /* displays a short stack trace */
-void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
-               const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *esp, const char *loglvl)
 {
        if (esp == NULL)
                esp = (unsigned long *)&esp;
@@ -58,11 +57,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *esp,
        unwind_stack((void *)loglvl, esp, print_trace);
 }
 
-void show_stack(struct task_struct *task, unsigned long *esp)
-{
-       show_stack_loglvl(task, esp, KERN_EMERG);
-}
-
 void show_registers(struct pt_regs *regs)
 {
        int i;
@@ -104,7 +98,7 @@ void show_registers(struct pt_regs *regs)
        if (in_kernel) {
 
                printk("\nStack: ");
-               show_stack(NULL, (unsigned long *)esp);
+               show_stack(NULL, (unsigned long *)esp, KERN_EMERG);
 
                printk("\nCode: ");
                if (regs->pc < PAGE_OFFSET)
index c2411de3730f2c7ea6510f521b786df87cd5e2ba..0a89899f154a58ffba2ad1052134e02885616f0b 100644 (file)
@@ -198,17 +198,11 @@ static void parisc_show_stack(struct task_struct *task,
        do_show_stack(&info, loglvl);
 }
 
-void show_stack_loglvl(struct task_struct *t, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *t, unsigned long *sp, const char *loglvl)
 {
        parisc_show_stack(t, NULL, loglvl);
 }
 
-void show_stack(struct task_struct *t, unsigned long *sp)
-{
-       show_stack_loglvl(t, sp, KERN_CRIT)
-}
-
 int is_valid_bugaddr(unsigned long iaoq)
 {
        return 1;
index a456b4454b3fd046ad7dd3303d8786e66ee57abc..99d619f81cb52743ccf21dc8e9b8e889e0c0c4d9 100644 (file)
@@ -1456,7 +1456,7 @@ void show_regs(struct pt_regs * regs)
        printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
        printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
 #endif
-       show_stack(current, (unsigned long *) regs->gpr[1]);
+       show_stack(current, (unsigned long *) regs->gpr[1], KERN_DEFAULT);
        if (!user_mode(regs))
                show_instructions(regs);
 }
@@ -2063,8 +2063,8 @@ unsigned long get_wchan(struct task_struct *p)
 
 static int kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *stack,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *stack,
+               const char *loglvl)
 {
        unsigned long sp, ip, lr, newsp;
        int count = 0;
@@ -2133,11 +2133,6 @@ void show_stack_loglvl(struct task_struct *tsk, unsigned long *stack,
        put_task_stack(tsk);
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *stack)
-{
-       show_stack_loglvl(tsk, stack, KERN_DEFAULT);
-}
-
 #ifdef CONFIG_PPC64
 /* Called with hard IRQs off */
 void notrace __ppc64_runlatch_on(void)
index c477b8585a297a0e3998d7fb910e672ad6a525ff..b6440657ef92d065930a39d20ab6cc23d2d01ddd 100644 (file)
@@ -260,7 +260,7 @@ static void raise_backtrace_ipi(cpumask_t *mask)
                        pr_cont(" current pointer corrupt? (%px)\n", p->__current);
 
                pr_warn("Back trace of paca->saved_r1 (0x%016llx) (possibly stale):\n", p->saved_r1);
-               show_stack(p->__current, (unsigned long *)p->saved_r1);
+               show_stack(p->__current, (unsigned long *)p->saved_r1, KERN_WARNING);
        }
 }
 
index aaa64bf007f8202b24bbfc8ccc6025f14d24dffb..595342910c3f6437a945737e1e4e5187fa2f0e1c 100644 (file)
@@ -105,18 +105,12 @@ static bool print_trace_address(unsigned long pc, void *arg)
        return false;
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        pr_cont("Call Trace:\n");
        walk_stackframe(task, NULL, print_trace_address, (void *)loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 static bool save_wchan(unsigned long pc, void *arg)
 {
        if (!in_sched_functions(pc)) {
index 887a054919fc1ea9d18779939f42fabe848c9f15..0dc4b258b98d51c1c80c2a1eefea64c46ea7e1da 100644 (file)
@@ -126,7 +126,7 @@ unknown:
        return -EINVAL;
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
                       const char *loglvl)
 {
        struct unwind_state state;
@@ -139,11 +139,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
        debug_show_held_locks(task ? : current);
 }
 
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
-       show_stack_loglvl(task, stack, KERN_DEFAULT);
-}
-
 static void show_last_breaking_event(struct pt_regs *regs)
 {
        printk("Last Breaking-Event-Address:\n");
@@ -181,7 +176,7 @@ void show_regs(struct pt_regs *regs)
        show_registers(regs);
        /* Show stack backtrace if pt_regs is from kernel mode */
        if (!user_mode(regs))
-               show_stack(NULL, (unsigned long *) regs->gprs[15]);
+               show_stack(NULL, (unsigned long *) regs->gprs[15], KERN_DEFAULT);
        show_last_breaking_event(regs);
 }
 
index cc51e9d74667486e91d646180eb8dac646068a7e..a13c045804ed1027fcef019060885ca594233127 100644 (file)
@@ -144,8 +144,7 @@ void show_trace(struct task_struct *tsk, unsigned long *sp,
        debug_show_held_locks(tsk);
 }
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 {
        unsigned long stack;
 
@@ -161,8 +160,3 @@ void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
                 (unsigned long)task_stack_page(tsk));
        show_trace(tsk, sp, NULL, loglvl);
 }
-
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
index 0b07de5618e50baa357d628cfd46476152abb9a9..65c0d5207b0cd98f0d164e827929dec5451acc43 100644 (file)
@@ -145,12 +145,10 @@ void show_regs(struct pt_regs *r)
 }
 
 /*
- * The show_stack(), show_stack_loglvl() are external APIs which
- * we do not use ourselves.
+ * The show_stack() is external API which we do not use ourselves.
  * The oops is printed in die_if_kernel.
  */
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
-                      const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *_ksp, const char *loglvl)
 {
        unsigned long pc, fp;
        unsigned long task_base;
@@ -179,11 +177,6 @@ void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
        printk("%s\n", loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 /*
  * Free current thread data structures etc..
  */
index 423011e60982875fd44ba210f98be18ba5cfa781..5a4d9c8f89033642f1d971863e0651af6ff64f12 100644 (file)
@@ -195,7 +195,7 @@ void show_regs(struct pt_regs *regs)
               regs->u_regs[15]);
        printk("RPC: <%pS>\n", (void *) regs->u_regs[15]);
        show_regwindow(regs);
-       show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]);
+       show_stack(current, (unsigned long *)regs->u_regs[UREG_FP], KERN_DEFAULT);
 }
 
 union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
index 8715bc93bd9d8375158430e59e6f7e7e75903c4d..96d92f1075514e57cabf03187d902fcd9ca1b0b2 100644 (file)
@@ -2453,8 +2453,7 @@ static void user_instruction_dump(unsigned int __user *pc)
        printk("\n");
 }
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
-                        const char *loglvl)
+void show_stack(struct task_struct *tsk, unsigned long *_ksp, const char *loglvl)
 {
        unsigned long fp, ksp;
        struct thread_info *tp;
@@ -2514,11 +2513,6 @@ void show_stack_loglvl(struct task_struct *tsk, unsigned long *_ksp,
        } while (++count < 16);
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *_ksp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 static inline struct reg_window *kernel_stack_up(struct reg_window *rw)
 {
        unsigned long fp = rw->ins[6];
index 30575bd9297525400c4510f55eee038f6e7eb1ae..a2e680f7d39f25af3bcfc09bfaac464de7faec66 100644 (file)
@@ -648,7 +648,7 @@ static void stack_proc(void *arg)
 {
        struct task_struct *task = arg;
 
-       show_stack(task, NULL);
+       show_stack(task, NULL, KERN_INFO);
 }
 
 /*
index 1b54b6431499b52e54def2fab428db8df75c9639..acbc879d27733660803a7e77637059c6aeba79b3 100644 (file)
@@ -27,7 +27,7 @@ static const struct stacktrace_ops stackops = {
        .address = _print_addr
 };
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
+void show_stack(struct task_struct *task, unsigned long *stack,
                       const char *loglvl)
 {
        struct pt_regs *segv_regs = current->thread.segv_regs;
@@ -56,8 +56,3 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *stack,
        dump_trace(current, &stackops, (void *)loglvl);
        printk("%s\n", loglvl);
 }
-
-void show_stack(struct task_struct *task, unsigned long *stack)
-{
-       show_stack_loglvl(task, stack, KERN_INFO);
-}
index 8b1335997f50250ff94b179007e9ab3ff3e52bec..a3ac01df1a2e438887a98e4fb6b416066cb23f65 100644 (file)
@@ -167,18 +167,13 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
                c_backtrace(fp, loglvl);
 }
 
-void show_stack_loglvl(struct task_struct *tsk, unsigned long *sp,
+void show_stack(struct task_struct *tsk, unsigned long *sp,
                       const char *loglvl)
 {
        dump_backtrace(NULL, tsk, loglvl);
        barrier();
 }
 
-void show_stack(struct task_struct *tsk, unsigned long *sp)
-{
-       show_stack_loglvl(tsk, sp, KERN_DEFAULT)
-}
-
 static int __die(const char *str, int err, struct thread_info *thread,
                struct pt_regs *regs)
 {
index 9d2c076be37a660d7f97211d44d6b50a1f7b3d83..5f816861f5d20302a00a555fbc2515693ced3ec7 100644 (file)
@@ -159,7 +159,7 @@ static void dump_leak(void)
                return;
        dump = 1;
 
-       show_stack_loglvl(NULL, NULL, KERN_ERR);
+       show_stack(NULL, NULL, KERN_ERR);
        debug_dma_dump_mappings(NULL);
 }
 #endif
index 4396f2cfad19721d0ec1cb164877f84592f1aa32..456511b2284eab415a3ae2797d9db5c2ecedc16c 100644 (file)
@@ -279,7 +279,7 @@ next:
        }
 }
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
+void show_stack(struct task_struct *task, unsigned long *sp,
                       const char *loglvl)
 {
        task = task ? : current;
@@ -294,11 +294,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
        show_trace_log_lvl(task, NULL, sp, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_DEFAULT);
-}
-
 void show_stack_regs(struct pt_regs *regs)
 {
        show_trace_log_lvl(current, regs, NULL, KERN_DEFAULT);
index 1013acc2e03ea1a6e9a376dce9ab995a1351cc37..e880460741d2bae3c72a1c5fd7e2081b6ecdb1e0 100644 (file)
@@ -501,8 +501,7 @@ static void show_trace(struct task_struct *task, unsigned long *sp,
 #define STACK_DUMP_LINE_SIZE 32
 static size_t kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
 
-void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                      const char *loglvl)
+void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
 {
        size_t len;
 
@@ -519,11 +518,6 @@ void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
        show_trace(task, sp, loglvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_loglvl(task, sp, KERN_INFO);
-}
-
 DEFINE_SPINLOCK(die_lock);
 
 void die(const char * str, struct pt_regs * regs, long err)
@@ -540,7 +534,7 @@ void die(const char * str, struct pt_regs * regs, long err)
        pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr);
        show_regs(regs);
        if (!user_mode(regs))
-               show_stack(NULL, (unsigned long*)regs->areg[1]);
+               show_stack(NULL, (unsigned long *)regs->areg[1], KERN_INFO);
 
        add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
        spin_unlock_irq(&die_lock);
index be5af89bbff16a05bd063d0d6cd6b54b8ac1b323..9dd85bea40260a951a805a6c44100c7b6e500149 100644 (file)
@@ -519,7 +519,7 @@ static void dpm_watchdog_handler(struct timer_list *t)
        struct dpm_watchdog *wd = from_timer(wd, t, timer);
 
        dev_emerg(wd->dev, "**** DPM device timeout ****\n");
-       show_stack_loglvl(wd->tsk, NULL, KERN_EMERG);
+       show_stack(wd->tsk, NULL, KERN_EMERG);
        panic("%s %s: unrecoverable failure\n",
                dev_driver_string(wd->dev), dev_name(wd->dev));
 }
index 7bd935379dece4ffbfc51f34dc879a453d8985a1..7c95afa905a083222b4c34248c6039779568c6d6 100644 (file)
@@ -235,7 +235,7 @@ static void showacpu(void *dummy)
 
        raw_spin_lock_irqsave(&show_lock, flags);
        pr_info("CPU%d:\n", smp_processor_id());
-       show_stack_loglvl(NULL, NULL, KERN_INFO);
+       show_stack(NULL, NULL, KERN_INFO);
        raw_spin_unlock_irqrestore(&show_lock, flags);
 }
 
index 373e4e3faf2ad939354b4edbe4902970b8917758..00c45a0e6abe12a804a9c74cb686e500958895ed 100644 (file)
@@ -30,9 +30,8 @@ extern void show_regs(struct pt_regs *);
  * task), SP is the stack pointer of the first frame that should be shown in the back
  * trace (or NULL if the entire call-chain of the task should be shown).
  */
-extern void show_stack(struct task_struct *task, unsigned long *sp);
-extern void show_stack_loglvl(struct task_struct *task, unsigned long *sp,
-                             const char *loglvl);
+extern void show_stack(struct task_struct *task, unsigned long *sp,
+                      const char *loglvl);
 
 extern void sched_show_task(struct task_struct *p);
 
index 43f5dcd2b9ac7ed4f640779db0055c4dc092d342..18e03aba2cfc7db7af4b0853ba2228d3f6c2a374 100644 (file)
@@ -30,7 +30,7 @@ static void kdb_show_stack(struct task_struct *p, void *addr)
                kdb_dump_stack_on_cpu(kdb_process_cpu(p));
                console_loglevel = old_lvl;
        } else {
-               show_stack_loglvl(p, addr, KERN_EMERG);
+               show_stack(p, addr, KERN_EMERG);
        }
 
        kdb_trap_printk--;
index 5e63d6e8a2230bbe0a4c2df6a5a8563321162036..36e69100e8e0620850d957f668f3045e962bb2d9 100644 (file)
@@ -125,7 +125,7 @@ void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter)
 
        printk("\n%s/%d's [blocked] stackdump:\n\n",
                task->comm, task_pid_nr(task));
-       show_stack_loglvl(task, NULL, KERN_DEFAULT);
+       show_stack(task, NULL, KERN_DEFAULT);
        printk("\n%s/%d's [current] stackdump:\n\n",
                current->comm, task_pid_nr(current));
        dump_stack();
index c68a6e7b306feb72b454f13eae98a910e3410f72..8f360326861ec866d5ffb206f8a4c7bc47520350 100644 (file)
@@ -6025,7 +6025,7 @@ void sched_show_task(struct task_struct *p)
                (unsigned long)task_thread_info(p)->flags);
 
        print_worker_info(KERN_INFO, p);
-       show_stack_loglvl(p, NULL, KERN_INFO);
+       show_stack(p, NULL, KERN_INFO);
        put_task_stack(p);
 }
 EXPORT_SYMBOL_GPL(sched_show_task);
index 5595e8962cf6bdf1f8154cad31b2d4740ee07de4..a00ee6eedc7c3c7e88c69e509af28f5b44c3bf22 100644 (file)
@@ -74,7 +74,7 @@ void show_regs_print_info(const char *log_lvl)
 static void __dump_stack(void)
 {
        dump_stack_print_info(KERN_DEFAULT);
-       show_stack_loglvl(NULL, NULL, KERN_DEFAULT);
+       show_stack(NULL, NULL, KERN_DEFAULT);
 }
 
 /**