From: Adrien Schildknecht <adrien+dev@schischi.me>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, rostedt@goodmis.org, heukelum@fastmail.fm,
luto@amacapital.net, adech.fo@gmail.com,
masami.hiramatsu.pt@hitachi.com, akpm@linux-foundation.org,
a.ryabinin@samsung.com, fruggeri@arista.com
Cc: linux-kernel@vger.kernel.org,
Adrien Schildknecht <adrien+dev@schischi.me>
Subject: [PATCH 1/2] x86: fix output of show_stack_log_lvl()
Date: Thu, 19 Feb 2015 23:43:15 +0100 [thread overview]
Message-ID: <1424385796-28910-2-git-send-email-adrien+dev@schischi.me> (raw)
In-Reply-To: <1424385796-28910-1-git-send-email-adrien+dev@schischi.me>
Prepend the log level at the message following a newline.
It is not possible to use pr_cont after a newline, the log level will be
reseted.
Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
---
arch/x86/kernel/dumpstack_32.c | 9 ++++++---
arch/x86/kernel/dumpstack_64.c | 9 ++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index 5abd4cd..efff5ed 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -108,9 +108,12 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
for (i = 0; i < kstack_depth_to_print; i++) {
if (kstack_end(stack))
break;
- if (i && ((i % STACKSLOTS_PER_LINE) == 0))
- pr_cont("\n");
- pr_cont(" %08lx", *stack++);
+ if ((i % STACKSLOTS_PER_LINE) == 0) {
+ if (i != 0)
+ pr_cont("\n");
+ printk("%s %08lx", log_lvl, *stack++);
+ } else
+ pr_cont(" %08lx", *stack++);
touch_nmi_watchdog();
}
pr_cont("\n");
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index ff86f19..553573b 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -283,9 +283,12 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
if (((long) stack & (THREAD_SIZE-1)) == 0)
break;
}
- if (i && ((i % STACKSLOTS_PER_LINE) == 0))
- pr_cont("\n");
- pr_cont(" %016lx", *stack++);
+ if ((i % STACKSLOTS_PER_LINE) == 0) {
+ if (i != 0)
+ pr_cont("\n");
+ printk("%s %016lx", log_lvl, *stack++);
+ } else
+ pr_cont(" %016lx", *stack++);
touch_nmi_watchdog();
}
preempt_enable();
--
2.2.1
next prev parent reply other threads:[~2015-02-19 22:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 22:43 [PATCH 0/2] x86: fix output of show_stack_log_lvl Adrien Schildknecht
2015-02-19 22:43 ` Adrien Schildknecht [this message]
2015-02-20 0:06 ` [PATCH 1/2] x86: fix output of show_stack_log_lvl() Borislav Petkov
2015-02-19 22:43 ` [PATCH 2/2] x86: fix output of show_trace_log_lvl() Adrien Schildknecht
2015-02-20 2:34 ` [PATCH v2] x86: fix output of show_stack_log_lvl() Adrien Schildknecht
2015-02-20 4:45 ` Steven Rostedt
[not found] ` <CA+55aFzDt_7Rs9=4XFKo0LP4iBnV4qmJWUDACtBDbV4eRE-X9A@mail.gmail.com>
2015-02-20 17:05 ` Steven Rostedt
2015-02-20 17:35 ` Borislav Petkov
2015-02-20 17:40 ` Joe Perches
[not found] ` <CA+55aFx8pcoGzKuTubwzcBc-0=_Eoiu2n=Ub75PDuo8GkZvyng@mail.gmail.com>
2015-02-20 18:03 ` Joe Perches
2015-02-20 18:51 ` Linus Torvalds
2015-02-20 19:15 ` Joe Perches
2015-02-20 8:10 ` Ingo Molnar
2015-02-20 10:38 ` Borislav Petkov
2015-02-20 16:39 ` Adrien Schildknecht
2015-03-03 11:28 ` [tip:x86/debug] x86/kernel: Fix " tip-bot for Adrien Schildknecht
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=1424385796-28910-2-git-send-email-adrien+dev@schischi.me \
--to=adrien+dev@schischi.me \
--cc=a.ryabinin@samsung.com \
--cc=adech.fo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fruggeri@arista.com \
--cc=heukelum@fastmail.fm \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
Powered by JetHome