s390/dumpstack: remove raw stack dump
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 6 Jun 2017 08:04:26 +0000 (10:04 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 12 Jun 2017 14:26:01 +0000 (16:26 +0200)
Remove raw stack dumps that are printed before call traces in case of
a warning, or the 'l' sysrq trigger (show a stack backtrace for all
active CPUs).

Besides that a raw stack dump should not be shown for the 'l' sysrq
trigger the value of the dump is close to zero. That's also why we
don't print it in case of a panic since ages anymore. That this is
still printed on warnings is just a leftover. So get rid of this
completely.

The following won't be printed anymore with this change:

Stack:
       00000000bbc4fbc8 00000000bbc4fc58 0000000000000003 0000000000000000
       00000000bbc4fcf8 00000000bbc4fc70 00000000bbc4fc70 0000000000000020
       000000007fe00098 00000000bfe8be00 00000000bbc4fe94 000000000000000a
       000000000000000c 00000000bbc4fcc0 0000000000000000 0000000000000000
       000000000095b930 0000000000113366 00000000bbc4fc58 00000000bbc4fca0

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/dumpstack.c

index 829e1c53005c57a81d735fd80e909931b8f9b810..62904890d1277a56849450a6abec0c8d665445c1 100644 (file)
@@ -98,8 +98,10 @@ static int show_address(void *data, unsigned long address, int reliable)
        return 0;
 }
 
-static void show_trace(struct task_struct *task, unsigned long sp)
+void show_stack(struct task_struct *task, unsigned long *stack)
 {
+       unsigned long sp = (unsigned long) stack;
+
        if (!sp)
                sp = task ? task->thread.ksp : current_stack_pointer();
        printk("Call Trace:\n");
@@ -109,29 +111,6 @@ static void show_trace(struct task_struct *task, unsigned long sp)
        debug_show_held_locks(task);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       unsigned long *stack;
-       int i;
-
-       stack = sp;
-       if (!stack) {
-               if (!task)
-                       stack = (unsigned long *)current_stack_pointer();
-               else
-                       stack = (unsigned long *)task->thread.ksp;
-       }
-       printk(KERN_DEFAULT "Stack:\n");
-       for (i = 0; i < 20; i++) {
-               if (((addr_t) stack & (THREAD_SIZE-1)) == 0)
-                       break;
-               if (i % 4 == 0)
-                       printk(KERN_DEFAULT "       ");
-               pr_cont("%016lx%c", *stack++, i % 4 == 3 ? '\n' : ' ');
-       }
-       show_trace(task, (unsigned long)sp);
-}
-
 static void show_last_breaking_event(struct pt_regs *regs)
 {
        printk("Last Breaking-Event-Address:\n");
@@ -169,7 +148,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_trace(NULL, regs->gprs[15]);
+               show_stack(NULL, (unsigned long *) regs->gprs[15]);
        show_last_breaking_event(regs);
 }