Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp684090rdb; Tue, 5 Dec 2023 17:41:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbo+5uABabDNP8GZ2NR6klcolSatTzAsEtaMCsVMpXZNR5Br+F/CR97NsG9f9SBBpKRKgV X-Received: by 2002:a92:d7c3:0:b0:35d:4dde:cb1a with SMTP id g3-20020a92d7c3000000b0035d4ddecb1amr306545ilq.13.1701826867325; Tue, 05 Dec 2023 17:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701826867; cv=none; d=google.com; s=arc-20160816; b=ecyafR3wjJ/+x5QTdc/N6AF8tvRAPwa2hguE0sgi3zQMIEyHsYH8nqK+cqryRPYo5y 5SmMTCqi6BStmBPLDbYLOZsmo2PbRLQ0FLO8j0uW3gIinMymp8CO6KE+vpwrPWD76bF2 32qvhpoeWY9ccPheygp6KeCXZAN5p5oI7xw4iIAoxLpEB/V+SgDthQF3xuMzqj2DktCH TkZSWsPUU553yjANk3yBHgZXZlHTdbIPJqHSwbc0QxfVhd7BHUNBEUlGlud3+DU3rv9R nnGXpmaVsMHa7ZvzOB3TLltkNGYlPa9MhBLfF1dJL0M5S8lDjlKoXiwlBNpwyO+q9tjW p5yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pE4wwothtRJLgrVaQZ6XFf/UR7oCE2Brpcu2Cfj/TdU=; fh=MiQcay5QYfYYDDdCOO92vBm+WZxz0OoqtdWNdgf5PHY=; b=tcxQvtwGIgRyCoYCgSOKceRSbmVusTtkb40Gspe6e8oP8cd5RPTX35gyOFp6gUPyav NsjukxkrFv+t/zMBNI8sVEQ2t/+b6GVKOlZFndr602s/WUf6NfpV4y87zt/89RkzMepq 56kB++GBqSZKBX5PaXqALQXx31Un+BzPWqKUO1mh6VbMxK5FZ37iWsEJMrr4J97DD9n6 5ZEazeZ+aUVZ5awKgtUFQIHYMBpcVeAKH9JMXlz2o2BS77dQXowukvpPOuGbSNrUA+Ih 3RE7tjg7yODmW+oCQzJYBSkgWnjWLjRsVZ99eX+YspFhadPXNAJ885z5MGWHi9cWuW0N dg/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dHDFB5xW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id i19-20020a63d453000000b0059beadab759si10660813pgj.652.2023.12.05.17.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 17:41:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dHDFB5xW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4E17A807C575; Tue, 5 Dec 2023 17:40:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376485AbjLFBkR (ORCPT + 99 others); Tue, 5 Dec 2023 20:40:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376467AbjLFBkQ (ORCPT ); Tue, 5 Dec 2023 20:40:16 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D79C91B5; Tue, 5 Dec 2023 17:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701826822; x=1733362822; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=84aGtB/DLStDTk9sSVHU7L8uXgDTgViYEQou2kivFBY=; b=dHDFB5xWYL4BuIGHCn7sYe3QNtUaFlANmiOYQ12hfleOVOZPY/FPLgcs 7btnEl64C3rd2hl8iHPB/JX19qE6KgBWm/39xg2f4/nLlTx93Rrx2/Paj MeV0ipXRf/+C9WnJ3gJBBdBvrsR/CJsE8UblKPmhavV1wESgX9pvvWncL 5yG4MZe7/ev346GmRNDrBgwrlsVEvi0BKDc6JJ7eibR2E03wp3eDK0SBA 4bSLCBRoLCm+5U4mPmwZIaOSWyqJwrtKQMyviF66TTxTeOzXdyeU6eWaC RF6KdaoAdwUeI1KZGnJbL4dH3KhQI5jn1y+YdnwNO2WE0WaPBbeNBn2Sm g==; X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="392853023" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="392853023" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 17:40:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="1018406103" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="1018406103" Received: from sohilmeh.sc.intel.com ([172.25.103.65]) by fmsmga006.fm.intel.com with ESMTP; 05 Dec 2023 17:40:06 -0800 From: Sohil Mehta To: x86@kernel.org Cc: Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Tony Luck , Sohil Mehta , Yazen Ghannam , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org Subject: [PATCH] x86/mce: Update references to the Intel SDM Date: Wed, 6 Dec 2023 01:38:46 +0000 Message-Id: <20231206013846.1859347-1-sohil.mehta@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 17:40:33 -0800 (PST) Chapter numbers in the SDM are not expected to be stable. In case of Machine-Check Architecture, it has moved from chapter 15 to chapter 16 with the recent SDM updates. Instead of changing the chapter number and having to do it again later, update the comments with 'Chapter name -> "Sub-section name"' to keep it easy enough to find the specific reference. Note, this intentionally skips the intermediate section names to avoid making the comments unnecessarily wordy. Signed-off-by: Sohil Mehta --- There are other places in arch/x86 that have stale references to the SDM as well. I am sending an MCE specific patch first to get a pulse. I can send out more patches if this approach seems reasonable. I am open to suggestions, is there a better way to do this? Or should we get rid of the references all together (expect for really the obscure text that would be hard to find otherwise)? --- arch/x86/include/asm/mce.h | 2 +- arch/x86/kernel/cpu/mce/core.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 6de6e1d95952..35fa25eb815b 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -72,7 +72,7 @@ */ #define MCACOD 0xefff /* MCA Error Code */ -/* Architecturally defined codes from SDM Vol. 3B Chapter 15 */ +/* Architecturally defined error codes from SDM: Machine-Check Architecture */ #define MCACOD_SCRUB 0x00C0 /* 0xC0-0xCF Memory Scrubbing */ #define MCACOD_SCRUBMSK 0xeff0 /* Skip bit 12 ('F' bit) */ #define MCACOD_L3WB 0x017A /* L3 Explicit Writeback */ diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 7b397370b4d6..d42122b1afea 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -482,7 +482,8 @@ bool mce_is_memory_error(struct mce *m) case X86_VENDOR_INTEL: case X86_VENDOR_ZHAOXIN: /* - * Intel SDM Volume 3B - 15.9.2 Compound Error Codes + * Intel SDM: Machine-Check Architecture -> "Compound Error + * Codes" * * Bit 7 of the MCACOD field of IA32_MCi_STATUS is used for * indicating a memory error. Bit 8 is used for indicating a @@ -698,7 +699,8 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b) goto log_it; /* - * Log UCNA (SDM: 15.6.3 "UCR Error Classification") + * Log UCNA (Intel SDM: Machine-Check Architecture -> "UCR + * Error Classification") * UC == 1 && PCC == 0 && S == 0 */ if (!(m.status & MCI_STATUS_PCC) && !(m.status & MCI_STATUS_S)) -- 2.34.1