From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54C03C433FE for ; Thu, 29 Sep 2022 14:01:50 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MdZmD6xs0z3f6G for ; Fri, 30 Sep 2022 00:01:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=oVmForOv; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MdZjj6wvnz307C for ; Thu, 29 Sep 2022 23:59:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=oVmForOv; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4MdZjf1Wl4z4xGT; Thu, 29 Sep 2022 23:59:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1664459974; bh=Wnbk66ivAKryyRRSf+MuMSh0U1FLFIq+sOvgdZFxJro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVmForOvQWAeBQrKY4EW1OVwPWnpA9sP+yVLo7y38avELS5HYrtLK0ql5tjiw0mp2 SQqKtmIWTVxyYsszIF4s/CqJ5c+T3GDm/enLKIBa8xONlPM8YuSjDdXyPv/O3WOHs8 O746pyEY1vEOLvgRjKFbexgWCpcV2l3eGhfDKiok8rKux+0DXltf2L2RUEvFa+Jljp 5gw0/0LwFh6cHMkCah0nM3QjSwtilzWkXZ0Uk1UZdbI3YW3jisBA9XI8W6lPglX5Cz kbp16V43kFsYCgUtYZ6T/HA7+Rebw2ijtGOgbHT6gWOD2+xUJjA0JwrtqvsPUg//mn mACvXWIfOeekg== From: Michael Ellerman To: Subject: [PATCH v2 2/6] powerpc: Add PVR & CPU name to hardware description Date: Thu, 29 Sep 2022 23:59:15 +1000 Message-Id: <20220929135919.1983269-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220929135919.1983269-1-mpe@ellerman.id.au> References: <20220929135919.1983269-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nathanl@linux.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Add the PVR and CPU name to the hardware description, which is printed at boot and in case of an oops. eg: Hardware name: ... cpu:'POWER8E (raw)' pvr:0x4b0201 Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/prom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 2e7a04dab2f7..b42e2dbeb021 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -819,6 +820,10 @@ void __init early_init_devtree(void *params) dt_cpu_ftrs_scan(); + // We can now add the CPU name & PVR to the hardware description + seq_buf_printf(&ppc_hw_desc, "cpu:'%s' pvr:0x%04lx ", cur_cpu_spec->cpu_name, + mfspr(SPRN_PVR)); + /* Retrieve CPU related informations from the flat tree * (altivec support, boot CPU ID, ...) */ -- 2.37.3