Commit 3cfa5d64 authored by Kefeng Wang's avatar Kefeng Wang Committed by Lipeng Sang
Browse files

riscv: Add machine name to kernel boot log and stack dump output

stable inclusion
from stable-v5.10.152
commit 0e4c06ae7c546764eb4769ede647ef71a2fd363d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0e4c06ae7c546764eb4769ede647ef71a2fd363d



--------------------------------

[ Upstream commit 46ad48e8 ]

Add the machine name to kernel boot-up log, and install
the machine name to stack dump for DT boot mode.

Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
Stable-dep-of: 10f6913c ("riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent f8f7712b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -54,8 +54,15 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
static void __init parse_dtb(void)
{
	/* Early scan of device tree from init memory */
	if (early_init_dt_scan(dtb_early_va))
	if (early_init_dt_scan(dtb_early_va)) {
		const char *name = of_flat_dt_get_machine_name();

		if (name) {
			pr_info("Machine model: %s\n", name);
			dump_stack_set_arch_desc("%s (DT)", name);
		}
		return;
	}

	pr_err("No DTB passed to the kernel\n");
#ifdef CONFIG_CMDLINE_FORCE