From: Matt Redfearn <matt.redfearn@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>,
Matt Redfearn <matt.redfearn@imgtec.com>,
"Maciej W. Rozycki" <macro@imgtec.com>,
<linux-kernel@vger.kernel.org>,
James Hogan <james.hogan@imgtec.com>,
Paul Burton <paul.burton@imgtec.com>
Subject: [PATCH 2/4] MIPS: traps: Fix output of show_stacktrace
Date: Wed, 19 Oct 2016 14:33:21 +0100 [thread overview]
Message-ID: <1476884003-17306-3-git-send-email-matt.redfearn@imgtec.com> (raw)
In-Reply-To: <1476884003-17306-1-git-send-email-matt.redfearn@imgtec.com>
Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing
continuation lines") the output from show_stacktrace on MIPS has been
pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
provide the appropriate markers & restore the expected output. Also
start a new line with printk such that the presence of timing
information does not interfere with output.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
---
arch/mips/kernel/traps.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6ae5ea752d4c..25ce866b2895 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -174,22 +174,24 @@ static void show_stacktrace(struct task_struct *task,
printk("Stack :");
i = 0;
while ((unsigned long) sp & (PAGE_SIZE - 1)) {
- if (i && ((i % (64 / field)) == 0))
- printk("\n ");
+ if (i && ((i % (64 / field)) == 0)) {
+ pr_cont("\n");
+ printk(" ");
+ }
if (i > 39) {
- printk(" ...");
+ pr_cont(" ...");
break;
}
if (__get_user(stackdata, sp++)) {
- printk(" (Bad stack address)");
+ pr_cont(" (Bad stack address)");
break;
}
- printk(" %0*lx", field, stackdata);
+ pr_cont(" %0*lx", field, stackdata);
i++;
}
- printk("\n");
+ pr_cont("\n");
show_backtrace(task, regs);
}
--
2.7.4
next prev parent reply other threads:[~2016-10-19 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 13:33 [PATCH 0/4] MIPS: traps: Fix fallout from reinstatation of KERN_CONT Matt Redfearn
2016-10-19 13:33 ` [PATCH 1/4] MIPS: traps: Fix output of show_backtrace Matt Redfearn
2016-10-19 13:33 ` Matt Redfearn [this message]
2016-10-19 13:33 ` [PATCH 3/4] MIPS: traps: Fix output of show_code Matt Redfearn
2016-10-19 13:33 ` [PATCH 4/4] MIPS: Fix __show_regs() output Matt Redfearn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476884003-17306-3-git-send-email-matt.redfearn@imgtec.com \
--to=matt.redfearn@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@imgtec.com \
--cc=paul.burton@imgtec.com \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®