lkml.org 
[lkml]   [2012]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[TRIVIAL PATCH 12/26] s390: Convert print_symbol to %pSR
Date
Use the new vsprintf extension to avoid any possible
message interleaving.

Signed-off-by: Joe Perches <joe@perches.com>
---
arch/s390/kernel/traps.c | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 70ecfc5..f718e12 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -91,8 +91,9 @@ __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);
+ printk("([<%016lx>] %pSR\n",
+ sf->gprs[8] & PSW_ADDR_INSN,
+ (void *)(sf->gprs[8] & PSW_ADDR_INSN));
/* Follow the backchain. */
while (1) {
low = sp;
@@ -102,16 +103,18 @@ __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);
+ printk(" [<%016lx>] %pSR\n",
+ sf->gprs[8] & PSW_ADDR_INSN,
+ (void *)(sf->gprs[8] & PSW_ADDR_INSN));
}
/* 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);
+ printk(" [<%016lx>] %pSR\n",
+ regs->psw.addr & PSW_ADDR_INSN,
+ (void *)(regs->psw.addr & PSW_ADDR_INSN));
low = sp;
sp = regs->gprs[15];
}
@@ -169,8 +172,9 @@ 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] & PSW_ADDR_INSN,
+ (void *)(regs->args[0] & PSW_ADDR_INSN));
#endif
}

@@ -201,10 +205,10 @@ void show_registers(struct pt_regs *regs)
char *mode;

mode = user_mode(regs) ? "User" : "Krnl";
- printk("%s PSW : %p %p",
- mode, (void *) regs->psw.mask,
- (void *) regs->psw.addr);
- print_symbol(" (%s)\n", regs->psw.addr & PSW_ADDR_INSN);
+ printk("%s PSW : %p %p, %pSR\n",
+ mode, (void *)regs->psw.mask,
+ (void *)regs->psw.addr,
+ (void *)(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),
--
1.7.8.112.g3fd21


\
 
 \ /
  Last update: 2012-12-12 20:01    [W:0.359 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site