From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: Use generic BUG() handler
Date: Tue, 1 Mar 2011 20:32:35 +0000 [thread overview]
Message-ID: <20110301203235.GE27107@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1298939263-16421-1-git-send-email-sjg@chromium.org>
On Mon, Feb 28, 2011 at 04:27:43PM -0800, Simon Glass wrote:
> @@ -55,7 +56,8 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long);
> void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame)
> {
> #ifdef CONFIG_KALLSYMS
> - printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
> + printk(" [<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where,
> + from, (void *)from);
> #else
> printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
> #endif
> @@ -171,7 +173,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
> unsigned int fp, mode;
> int ok = 1;
>
> - printk("Backtrace: ");
> + printk("Backtrace:\n");
>
> if (!tsk)
> tsk = current;
Why are you changing the way backtraces are printed? This introduces a
useless blank line in the oops dump. The previous hunk increases the
probability of mailers wrapping the backtrace making it harder to read.
If you're going to change the formatting of the Oops dump, please do it
as a separate patch and explain carefully why the change is necessary.
> diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c
> index d2cb0b3..3f065bd 100644
> --- a/arch/arm/kernel/unwind.c
> +++ b/arch/arm/kernel/unwind.c
> @@ -355,6 +355,7 @@ void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk)
> register unsigned long current_sp asm ("sp");
>
> pr_debug("%s(regs = %p tsk = %p)\n", __func__, regs, tsk);
> + printk("Backtrace:\n");
Err, no. This is in the wrong place.
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index 86b66f3..591ab50 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -72,6 +72,18 @@ SECTIONS
>
> PERCPU(PAGE_SIZE)
>
> + /*
> + * .exit.text is discarded at runtime, not link time, to deal with
> + * references from bug_table
> + */
> + .exit.text : AT(ADDR(.exit.text)) {
> + EXIT_TEXT
> + }
> +
> + .exit.data : AT(ADDR(.exit.data)) {
> + EXIT_DATA
> + }
> +
> #ifndef CONFIG_XIP_KERNEL
> . = ALIGN(PAGE_SIZE);
> __init_end = .;
> @@ -246,7 +258,6 @@ SECTIONS
> __tcm_end = .;
> }
> #endif
> -
> BSS_SECTION(0, 0, 0)
> _end = .;
>
> @@ -254,7 +265,7 @@ SECTIONS
> .comment 0 : { *(.comment) }
>
> /* Default discards */
> - DISCARDS
> + /*DISCARDS*/
>
> #ifndef CONFIG_SMP_ON_UP
> /DISCARD/ : {
And this is a mess.
prev parent reply other threads:[~2011-03-01 20:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 0:27 [RFC PATCH] ARM: Use generic BUG() handler Simon Glass
2011-03-01 8:49 ` Russell King - ARM Linux
2011-03-01 8:59 ` Russell King - ARM Linux
2011-03-01 9:12 ` Mikael Pettersson
2011-03-01 10:03 ` Russell King - ARM Linux
2011-03-01 16:34 ` Simon Glass
2011-03-01 20:28 ` Russell King - ARM Linux
2011-03-02 10:59 ` Dave Martin
2011-03-03 14:11 ` Russell King - ARM Linux
2011-03-03 14:44 ` Dave Martin
2011-03-01 17:48 ` Dave Martin
2011-03-01 20:32 ` Russell King - ARM Linux [this message]
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=20110301203235.GE27107@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).