lkml.org 
[lkml]   [2017]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] arm64: Print DT machine model in setup_machine_fdt()
Date
On arm32, the machine model specified in the device tree is printed
during boot-up, courtesy of of_flat_dt_match_machine().

On arm64, of_flat_dt_match_machine() is not called, and the machine
model information is not available from the kernel log.

Print the machine model to make it easier to derive the machine model
from an arbitrary kernel boot log.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
I have scripts to save kernel boot logs, and compare logs[*] for
subsequent boots on the same machine. Having a way to extract the
machine model from an arbitrary kernel boot log makes this easier.

Yes, I'm also a big fan of CONFIG_LOCALVERSION_AUTO and
CONFIG_LOCALVERSION.

[*] and clock and PM domain lists...
---
arch/arm64/kernel/setup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 28855ec1be95e113..2c822ef94f341417 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -180,6 +180,7 @@ static void __init smp_build_mpidr_hash(void)
static void __init setup_machine_fdt(phys_addr_t dt_phys)
{
void *dt_virt = fixmap_remap_fdt(dt_phys);
+ const char *name;

if (!dt_virt || !early_init_dt_scan(dt_virt)) {
pr_crit("\n"
@@ -192,7 +193,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
cpu_relax();
}

- dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
+ name = of_flat_dt_get_machine_name();
+ pr_info("Machine model: %s\n", name);
+ dump_stack_set_arch_desc("%s (DT)", name);
}

static void __init request_standard_resources(void)
--
2.7.4
\
 
 \ /
  Last update: 2017-04-27 14:34    [W:0.054 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site