Skip to content

Commit 2f9a0be

Browse files
geertuctmarinas
authored andcommitted
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: Will Deacon <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent f533734 commit 2f9a0be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/arm64/kernel/setup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ static void __init smp_build_mpidr_hash(void)
180180
static void __init setup_machine_fdt(phys_addr_t dt_phys)
181181
{
182182
void *dt_virt = fixmap_remap_fdt(dt_phys);
183+
const char *name;
183184

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

195-
dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
196+
name = of_flat_dt_get_machine_name();
197+
pr_info("Machine model: %s\n", name);
198+
dump_stack_set_arch_desc("%s (DT)", name);
196199
}
197200

198201
static void __init request_standard_resources(void)

0 commit comments

Comments
 (0)