Patch "riscv: Add machine name to kernel boot log and stack dump output" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     riscv-add-machine-name-to-kernel-boot-log-and-stack-.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f70267a06e7f8e62e815e2253de4b2ac7fa5a28b
Author: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Date:   Wed Nov 25 19:44:15 2020 +0800

    riscv: Add machine name to kernel boot log and stack dump output
    
    [ Upstream commit 46ad48e8a28da7cc37a16c7e7fc632ecf906e4bf ]
    
    Add the machine name to kernel boot-up log, and install
    the machine name to stack dump for DT boot mode.
    
    Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
    Reviewed-by: Atish Patra <atish.patra@xxxxxxx>
    Signed-off-by: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx>
    Stable-dep-of: 10f6913c548b ("riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 117f3212a8e4..5d17d3ce36fd 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux