Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp309269imj; Thu, 7 Feb 2019 04:48:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IaCeXuyXgn5LiqdFpkBH+o+5Ix43U9O0Ji3K+Zl2tU134yl6BDIUOWPRq5xSEZV3yeDR2ea X-Received: by 2002:a63:fa48:: with SMTP id g8mr14684376pgk.203.1549543707002; Thu, 07 Feb 2019 04:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549543706; cv=none; d=google.com; s=arc-20160816; b=03snD9keswjB00KcHz0aBIpbn7XJsoRNj1EsBK9NNCnViL2nghBPabSgnQWXX/exmE 4M0oU8R3VcsosQRrc6Vi8nwWFkgVJoJczLX6xg0FlQ9L6Hj6UjwbLFv5SR1zdMi+M2ZM GW7opyZoDqdMXGv78lJ4W9uOXi59etXgWxju77fBNOUdHjeI7X33Oy8qM1XWEZtXo3dQ jmmtbaP4uFThnnX1Uiac9r0E7a+FPFIhhVLJONNi2FyU9oEZ1TGxz9S5HV750j96LSKs m+5t/IFrkQQZ9BvrTUybUsGBaqX3xgJrIRRiN4KhvYbnnXnbccgUkeXLL9/Zt2F3DiER JgNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=D5H3Rq5o0XcdkezLjJK0baFQ8A4AfYtNsizOor7WTpE=; b=Tf58zE5e+HTl0YE5DHT9GN4zVP2iF1ZvfRk+0kSPqJcI+Y6YWR73AMj6fayWNaU5Em pq7Q03gXBTK31/5gdeoDZ5eZ5DLRD/uEm+l3hV/dUkTdKiK/asmydumAfkz+7xPc3xf3 X3N/HBSkznhqNHcnIZkU5sVBhIsuqz1D0FpPO/OJs/8ugDgP4Py8M3wRncdUJq/jdz2S hkYURM0PieJPPlYxFp/afwnS3N6CMMfP7CzGmxNJB08LaKF/x/O1vxS+th3s94yiHFt3 vT3KKPgp2onS19/BKmhHxYK7jlLfyiLxxKxEhIBrelXKrjSbUL7kqxnQxwM+KOhqsw2Q vZYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si8852879pgg.44.2019.02.07.04.48.10; Thu, 07 Feb 2019 04:48:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727203AbfBGMq4 (ORCPT + 99 others); Thu, 7 Feb 2019 07:46:56 -0500 Received: from ozlabs.org ([203.11.71.1]:46827 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbfBGMqy (ORCPT ); Thu, 7 Feb 2019 07:46:54 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 43wJ3b6Jzkz9s6w; Thu, 7 Feb 2019 23:46:51 +1100 (AEDT) From: Michael Ellerman To: linuxppc-dev@ozlabs.org Cc: akpm@linux-foundation.org, tj@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, dyoung@redhat.com, sergey.senozhatsky@gmail.com, pmladek@suse.com Subject: [PATCH v3 2/7] powerpc: Add PVR & CPU name to dump stack arch description Date: Thu, 7 Feb 2019 23:46:30 +1100 Message-Id: <20190207124635.3885-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207124635.3885-1-mpe@ellerman.id.au> References: <20190207124635.3885-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As soon as we've done some basic setup, add the PVR and CPU name to the dump stack arch description, which is printed in case of an oops. eg: Hardware name: ... POWER8E (raw) pvr:0x4b0201 Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/cputable.c | 1 + arch/powerpc/kernel/prom.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 1eab54bc6ee9..8b4520a84612 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 4181ec715f88..ea2c3498067d 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -761,6 +761,10 @@ void __init early_init_devtree(void *params) dt_cpu_ftrs_scan(); + /* We can now set the CPU name & PVR for the oops output */ + dump_stack_add_arch_desc("%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.20.1