From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 492C6AD23 for ; Thu, 27 Oct 2022 17:07:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C54BAC433C1; Thu, 27 Oct 2022 17:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666890477; bh=sd7y5klKN2/PT2z4ZKkozoAYeLYWjZU79dg5afzW3DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qoK2X8iOXuKQsN190UMpothG874UZxJ6CyQB8+AYkIq9BS83KPy/MBAb9A5p8vzvz 2KRMFT00NU+zJbyh4X/jtcbg6Hh1Z0U0RAkb7hl79xLCBQvcAg2Kzzx9L2EK9erAxO 33qLNFjYbYY+ma3ulCS5srCdFG81/zkKrZz84iBo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kefeng Wang , Atish Patra , Palmer Dabbelt , Sasha Levin Subject: [PATCH 5.10 63/79] riscv: Add machine name to kernel boot log and stack dump output Date: Thu, 27 Oct 2022 18:56:13 +0200 Message-Id: <20221027165056.451901901@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221027165054.270676357@linuxfoundation.org> References: <20221027165054.270676357@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Kefeng Wang [ 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 Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt Stable-dep-of: 10f6913c548b ("riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb") Signed-off-by: Sasha Levin --- arch/riscv/kernel/setup.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.35.1