s390/dumpstack: convert print_symbol to %pSR
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 2 Sep 2013 09:20:00 +0000 (11:20 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 4 Sep 2013 15:19:07 +0000 (17:19 +0200)
This is the same as what other architectures did.
The change has also the advantage that there won't be any interleaving
messages between printk() and print_symbol().

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

index 87acc38..99e7f60 100644 (file)
@@ -40,14 +40,15 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high)
 {
        struct stack_frame *sf;
        struct pt_regs *regs;
+       unsigned long addr;
 
        while (1) {
                sp = sp & PSW_ADDR_INSN;
                if (sp < low || sp > high - sizeof(*sf))
                        return sp;
                sf = (struct stack_frame *) sp;
-               printk("([<%016lx>] ", sf->gprs[8] & PSW_ADDR_INSN);
-               print_symbol("%s)\n", sf->gprs[8] & PSW_ADDR_INSN);
+               addr = sf->gprs[8] & PSW_ADDR_INSN;
+               printk("([<%016lx>] %pSR)\n", addr, (void *)addr);
                /* Follow the backchain. */
                while (1) {
                        low = sp;
@@ -57,16 +58,16 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high)
                        if (sp <= low || sp > high - sizeof(*sf))
                                return sp;
                        sf = (struct stack_frame *) sp;
-                       printk(" [<%016lx>] ", sf->gprs[8] & PSW_ADDR_INSN);
-                       print_symbol("%s\n", sf->gprs[8] & PSW_ADDR_INSN);
+                       addr = sf->gprs[8] & PSW_ADDR_INSN;
+                       printk(" [<%016lx>] %pSR\n", addr, (void *)addr);
                }
                /* Zero backchain detected, check for interrupt frame. */
                sp = (unsigned long) (sf + 1);
                if (sp <= low || sp > high - sizeof(*regs))
                        return sp;
                regs = (struct pt_regs *) sp;
-               printk(" [<%016lx>] ", regs->psw.addr & PSW_ADDR_INSN);
-               print_symbol("%s\n", regs->psw.addr & PSW_ADDR_INSN);
+               addr = regs->psw.addr & PSW_ADDR_INSN;
+               printk(" [<%016lx>] %pSR\n", addr, (void *)addr);
                low = sp;
                sp = regs->gprs[15];
        }
@@ -128,8 +129,7 @@ static void show_last_breaking_event(struct pt_regs *regs)
 {
 #ifdef CONFIG_64BIT
        printk("Last Breaking-Event-Address:\n");
-       printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN);
-       print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN);
+       printk(" [<%016lx>] %pSR\n", regs->args[0], (void *)regs->args[0]);
 #endif
 }
 
@@ -143,10 +143,10 @@ void show_registers(struct pt_regs *regs)
        char *mode;
 
        mode = user_mode(regs) ? "User" : "Krnl";
-       printk("%s PSW : %p %p",
+       printk("%s PSW : %p %p (%pSR)\n",
               mode, (void *) regs->psw.mask,
+              (void *) regs->psw.addr,
               (void *) regs->psw.addr);
-       print_symbol(" (%s)\n", regs->psw.addr & PSW_ADDR_INSN);
        printk("           R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x "
               "P:%x AS:%x CC:%x PM:%x", mask_bits(regs, PSW_MASK_PER),
               mask_bits(regs, PSW_MASK_DAT), mask_bits(regs, PSW_MASK_IO),