Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp880602imj; Fri, 15 Feb 2019 08:18:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IYIc3mjp3GmMggzIpeclrgddFBtykMzXgOd03P/6+2xfPBbSvL7Ct2XGn1YG9Uyi5/ddVgW X-Received: by 2002:a17:902:8697:: with SMTP id g23mr1661744plo.30.1550247497201; Fri, 15 Feb 2019 08:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550247497; cv=none; d=google.com; s=arc-20160816; b=wxmTCLpLTe85rinHW7GJGr/Ife96mUbgo76p9a93TJJg0uwl8+Q3lZcqs1d9AKSjdx /qP9qELg6c2oUrYT6IUO2z4OQ2qpnJsdt92YSziVFKWm6t3lNUTmglXzlVFb20USEP6J APIPlNijd0CnqOjitaayk8AUTJpujEONZgAbdmN+Axpx6mwkq2PX2D7vXmiIPAmG4C10 XGGgTx1cUf3YMumfwZN1o+TbnLZMaLG37fVYZdRD1JmALQYDhO4JRsRGmbbd1Ch3W0Dw ly8TbC4yRIf7vkxZp9hanz+K5q8YsR2QTJLLyNA6gjPT5qpoy/km26p9sca0H+qJIQBC c+yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=1Lyx9kKkT8an0oU7KB6DAU/VXtLsPHgSXTQvunipx6Y=; b=tZQauS1lxOHP2aez+CejVHntqpCHsN+ms1SRD4HwfxG8OL5KKXeZkjOTI67looHRNk 5lYipjmxw/3KzPQILe1JwmnXiFZG2LcQ2BSzUXHNev+XIueQDN6vMPEtOoG/TVtPxyx5 wdJmjdYhHVnqGNq7RfJ3iVRCOTcSQVPIAQsQ8JFCRMB6BxYrNWpeEFt5vXULEGFF3FXK VvUXhloGvjyQzuvsWAmhrdCovY9cek3u10fklutNqaWp2yEzBGIdml2RvruJinur39Pn kpHdY4oQHP4ZHSsXgql7HuOfTXGSrkAiBXiMl6NWoMmCqnrfiICcAhHJoQlslazY9UBY cKwQ== 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 v19si6112528pfa.80.2019.02.15.08.18.00; Fri, 15 Feb 2019 08:18:17 -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 S2394958AbfBONlK (ORCPT + 99 others); Fri, 15 Feb 2019 08:41:10 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47363 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388929AbfBONlJ (ORCPT ); Fri, 15 Feb 2019 08:41:09 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x1FDeOqG1195844 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 Feb 2019 05:40:24 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x1FDeMD81195834; Fri, 15 Feb 2019 05:40:22 -0800 Date: Fri, 15 Feb 2019 05:40:22 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Yazen Ghannam Message-ID: Cc: puwen@hygon.cn, mchehab@kernel.org, linux-kernel@vger.kernel.org, yazen.ghannam@amd.com, mingo@redhat.com, james.morse@arm.com, bp@suse.de, hpa@zytor.com, qiuxu.zhuo@intel.com, mingo@kernel.org, tony.luck@intel.com, vishal.l.verma@intel.com, x86@kernel.org, tglx@linutronix.de, linux-edac@vger.kernel.org Reply-To: tony.luck@intel.com, mingo@kernel.org, qiuxu.zhuo@intel.com, x86@kernel.org, tglx@linutronix.de, linux-edac@vger.kernel.org, vishal.l.verma@intel.com, linux-kernel@vger.kernel.org, puwen@hygon.cn, mchehab@kernel.org, hpa@zytor.com, bp@suse.de, james.morse@arm.com, yazen.ghannam@amd.com, mingo@redhat.com In-Reply-To: <20190212212417.107049-1-Yazen.Ghannam@amd.com> References: <20190212212417.107049-1-Yazen.Ghannam@amd.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:ras/core] EDAC/mce_amd: Decode MCA_STATUS[Scrub] bit Git-Commit-ID: 3f4da372ec8e4ce58c17ac4f2e3c8891bbfea17e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 3f4da372ec8e4ce58c17ac4f2e3c8891bbfea17e Gitweb: https://git.kernel.org/tip/3f4da372ec8e4ce58c17ac4f2e3c8891bbfea17e Author: Yazen Ghannam AuthorDate: Tue, 12 Feb 2019 21:24:28 +0000 Committer: Borislav Petkov CommitDate: Fri, 15 Feb 2019 14:25:58 +0100 EDAC/mce_amd: Decode MCA_STATUS[Scrub] bit Previous AMD systems have had a bit in MCA_STATUS to indicate that an error was detected on a scrub operation. However, this bit was defined differently within different banks and families/models. Starting with Family 17h, MCA_STATUS[40] is either Reserved/Read-as-Zero or defined as "Scrub", for all MCA banks and CPU models. Therefore, this bit can be defined as the "Scrub" bit. Define MCA_STATUS[40] as "Scrub" and decode it in the AMD MCE decoding module for Family 17h and newer systems. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Morse Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Pu Wen Cc: Qiuxu Zhuo Cc: Thomas Gleixner Cc: Tony Luck Cc: Vishal Verma Cc: x86-ml Link: https://lkml.kernel.org/r/20190212212417.107049-1-Yazen.Ghannam@amd.com --- arch/x86/include/asm/mce.h | 1 + drivers/edac/mce_amd.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 299a38536567..22d05e3835f0 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -48,6 +48,7 @@ #define MCI_STATUS_SYNDV BIT_ULL(53) /* synd reg. valid */ #define MCI_STATUS_DEFERRED BIT_ULL(44) /* uncorrected error, deferred exception */ #define MCI_STATUS_POISON BIT_ULL(43) /* access poisonous data */ +#define MCI_STATUS_SCRUB BIT_ULL(40) /* Error detected during scrub operation */ /* * McaX field if set indicates a given bank supports MCA extensions: diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index f286b880f981..b349c22bb386 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c @@ -1078,6 +1078,9 @@ amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data) if (ecc) pr_cont("|%sECC", ((ecc == 2) ? "C" : "U")); + if (fam >= 0x17) + pr_cont("|%s", (m->status & MCI_STATUS_SCRUB ? "Scrub" : "-")); + pr_cont("]: 0x%016llx\n", m->status); if (m->status & MCI_STATUS_ADDRV)