Commit 2f9a0bec authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Catalin Marinas

arm64: Print DT machine model in setup_machine_fdt()

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.
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent f5337346
...@@ -180,6 +180,7 @@ static void __init smp_build_mpidr_hash(void) ...@@ -180,6 +180,7 @@ static void __init smp_build_mpidr_hash(void)
static void __init setup_machine_fdt(phys_addr_t dt_phys) static void __init setup_machine_fdt(phys_addr_t dt_phys)
{ {
void *dt_virt = fixmap_remap_fdt(dt_phys); void *dt_virt = fixmap_remap_fdt(dt_phys);
const char *name;
if (!dt_virt || !early_init_dt_scan(dt_virt)) { if (!dt_virt || !early_init_dt_scan(dt_virt)) {
pr_crit("\n" pr_crit("\n"
...@@ -192,7 +193,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys) ...@@ -192,7 +193,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
cpu_relax(); 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) static void __init request_standard_resources(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment