linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] ARM: add machine name to stack dump output
Date: Tue, 18 Nov 2014 18:29:08 -0800	[thread overview]
Message-ID: <546C0074.4040101@codeaurora.org> (raw)
In-Reply-To: <E1XqSw6-0002EZ-Kc@rmk-PC.arm.linux.org.uk>

On 11/17/2014 12:30 PM, Russell King wrote:
> The generic dump_stack() code provides the facility to include the
> machine name in the stack dump, which can be useful information.  Add
> a call to dump_stack_set_arch_desc() for the generic code to print
> this information.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/kernel/setup.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index c03106378b49..8361652b6dab 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -900,6 +900,7 @@ void __init setup_arch(char **cmdline_p)
>  		mdesc = setup_machine_tags(__atags_pointer, __machine_arch_type);
>  	machine_desc = mdesc;
>  	machine_name = mdesc->name;
> +	dump_stack_set_arch_desc("%s", mdesc->name);
>  

Would it be possible to use the DT machine name here if we're on a DT
platform? If we're using the generic DT machine descriptor this won't
show much of anything besides "Generic DT based system".

---8<----

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index c03106378b49..3a49baf4f54c 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -893,6 +893,7 @@ void __init hyp_mode_check(void)
 void __init setup_arch(char **cmdline_p)
 {
 	const struct machine_desc *mdesc;
+	const char *name;
 
 	setup_processor();
 	mdesc = setup_machine_fdt(__atags_pointer);
@@ -900,6 +901,11 @@ void __init setup_arch(char **cmdline_p)
 		mdesc = setup_machine_tags(__atags_pointer, __machine_arch_type);
 	machine_desc = mdesc;
 	machine_name = mdesc->name;
+	if (mdesc->nr == ~0)
+		name = of_flat_dt_get_machine_name();
+	else
+		name = mdesc->name;
+	dump_stack_set_arch_desc("%s", name);
 
 	if (mdesc->reboot_mode != REBOOT_HARD)
 		reboot_mode = mdesc->reboot_mode;

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2014-11-19  2:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 20:29 [PATCH 0/8] ARM cleanups Russell King - ARM Linux
2014-11-17 20:29 ` [PATCH 1/8] ARM: convert printk(KERN_* to pr_* Russell King
2014-11-19  2:02   ` Andrew Lunn
2014-11-17 20:29 ` [PATCH 2/8] ARM: use pr_warn_ratelimited() when migrating IRQs Russell King
2014-11-17 20:29 ` [PATCH 3/8] ARM: drop nwfpe initialisation message from warning to info level Russell King
2014-11-17 20:30 ` [PATCH 4/8] ARM: reduce "Booted secondary processor" message to debug level Russell King
2014-11-17 20:30 ` [PATCH 5/8] ARM: remove "SMP: Total of %d processors activated." message Russell King
2014-11-17 20:30 ` [PATCH 6/8] ARM: add machine name to stack dump output Russell King
2014-11-19  2:29   ` Stephen Boyd [this message]
2014-11-17 20:30 ` [PATCH 7/8] ARM: move ftrace assembly code to separate file Russell King
2014-11-17 20:30 ` [PATCH 8/8] ARM: io.c: clean up EXPORT_SYMBOL()s Russell King
2014-11-17 23:16 ` [PATCH 0/8] ARM cleanups Felipe Balbi
2014-11-20 19:37   ` Felipe Balbi

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=546C0074.4040101@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --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).