提交 3cfa5d64 编写于 作者: K Kefeng Wang 提交者: Lipeng Sang

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: NKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: NAtish Patra <atish.patra@wdc.com>
Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
Stable-dep-of: 10f6913c ("riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb")
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
上级 f8f7712b
...@@ -54,8 +54,15 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); ...@@ -54,8 +54,15 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
static void __init parse_dtb(void) static void __init parse_dtb(void)
{ {
/* Early scan of device tree from init memory */ /* 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; return;
}
pr_err("No DTB passed to the kernel\n"); pr_err("No DTB passed to the kernel\n");
#ifdef CONFIG_CMDLINE_FORCE #ifdef CONFIG_CMDLINE_FORCE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册