From nobody Thu Apr 9 15:10:25 2026 Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazon11013014.outbound.protection.outlook.com [40.93.196.14]) (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 CCBC53A63F7; Sat, 7 Mar 2026 16:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.196.14 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901222; cv=fail; b=HMlYMsPR94Iz+rCVcirWB5M2Kuy4mrieL4vcNomhpLyyWeGXelzh7ro0F7q/HhVju/nD6FlqMCYMlAu8PVzilfjLsBW0G3wX8fgjkwTgFnrBEgUg9kKkSNIcC2LMFNDMct2PzuoMGQ1mB/bfMTCAFZWgGX98mk2no4NbXCyL6R0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901222; c=relaxed/simple; bh=bMIGE/Ay9bLzGv5toEn+WJwK2kdWlt+3NjV6BQn+A+s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sLimOKlRrT6cAZl2E+BTttXI65zQiSSS4iCsjeW97beQypj9vrWXQfs9oH2g4wuM8Dv0EXC248/lsMI/An7w9Am9yv7CkSU3f8bta+gtZfxlw80meKp27k1QF+OUDt6WAu9svgbWSEutVuytN8r58Dao4kMkMHLFBYzequQDy08= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Lv6/1k+c; arc=fail smtp.client-ip=40.93.196.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Lv6/1k+c" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X7wtYD80Loth2g/9hz4uSxgoO5pvJNx9B8hTdIYiQGPHXmLQTeJTWJ+XkqxChVbrdzYJCf3ocYZ75zAp5oMPMO/TshfFY2xm1Ioktad18kx8zQYuab5fUIBir/OPUW+rGfMVL4i8iWcFl4iG2gQ31bQJpaCdPBXzc0oivQ080TVQKeKi0baCQARo5C4aXBIz+8mN3gwHi086cFdIFjeCMrAkWaAAKgnhDuqu4PwtGcJDmelRmW7gcpQCeqrYn8VwYX2LEFhAeNhUnF3LDDaKxvpC8f9hUoknrBIgAZLgEIvspGD0c/gKEe0qDi7rOjELUmsECcroSCxctJIsJdlfOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xBETdPqzr8LVGkFMv6pnt8FBkQqI3Catom6dsHE22qI=; b=CxVeFsTwLs9Zco0u5vYAn3E76c3H0c6TN8zc/CqN942DlOfavcBSFIMGkW9JwSlUqNcJu7ZSu3RYLxSkIex7bBuUecBqvMcPQXkdKD6Zjxan9CTHQAdigokMOa7d5lhOutG9Fzy8RurIcHK2LxI21zln1V8+YlcQp3mhXlgje84xEzmmMyTSYqKlXd+Cc75BAKeE6AlDbA6pp0UowkTRsQOgbZc3BzLP0clz9NPxqQUo59bbsE2Cx3vRKx8IG9V3mZqb7GVwcEuGRURuD6C8df+DlZC/VrRarK14XKSF8e+9PPa7UmIfd4oZ9Rw7mmND4fW6sjkfSo0ouI+Hv13iaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xBETdPqzr8LVGkFMv6pnt8FBkQqI3Catom6dsHE22qI=; b=Lv6/1k+ceIA3eShoOEXcphYoU/9XN3XoC20BcD4P9OQfKNMcjUzU8IayWVilCT51CvOlS27R4pSDiP0H7lft+jTKrfH8D8eF/WM3Sxtq3Ruz5r/H0HzkwixvA65Y5p4HiwNMIaECm09IC1RZ8r8I3kQMbEFmAQuuVl7ykL0tjF4= Received: from SJ0PR03CA0163.namprd03.prod.outlook.com (2603:10b6:a03:338::18) by BL1PR12MB5922.namprd12.prod.outlook.com (2603:10b6:208:399::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9700.5; Sat, 7 Mar 2026 16:33:36 +0000 Received: from SJ1PEPF00002327.namprd03.prod.outlook.com (2603:10b6:a03:338:cafe::58) by SJ0PR03CA0163.outlook.office365.com (2603:10b6:a03:338::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.22 via Frontend Transport; Sat, 7 Mar 2026 16:33:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002327.mail.protection.outlook.com (10.167.242.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Sat, 7 Mar 2026 16:33:35 +0000 Received: from yaz-khff2.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Sat, 7 Mar 2026 10:33:33 -0600 From: Yazen Ghannam To: CC: , , , Yazen Ghannam Subject: [PATCH v2 1/3] x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums Date: Sat, 7 Mar 2026 11:33:14 -0500 Message-ID: <20260307163316.345923-2-yazen.ghannam@amd.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260307163316.345923-1-yazen.ghannam@amd.com> References: <20260307163316.345923-1-yazen.ghannam@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002327:EE_|BL1PR12MB5922:EE_ X-MS-Office365-Filtering-Correlation-Id: 232739cd-2f16-447f-3504-08de7c6747c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|376014|1800799024; X-Microsoft-Antispam-Message-Info: n8t+e8uWgDlngw6pcdkiYuQMOnd9B8ISoDuK76YzjXVKSd6TqqrnqpbuuQJ02YGaWsXMRONZMjwh9Rpc4P+VxnXKCaWaNeCLVW0dzRviaCc39mLHhcogOLRb51m4jKvOfJ0Pxd7fBL7F4Oo3YgKxDs7P9NreCD9c3XNiIT5oSwCE1h1pkGn9Pl7zjUYN4mGSvfYUi10Edk9we3ZOt5YSGkjU7xIitx1TAtIipJHc7xt+KNKC0/yo3Bio3OBd1YxMtXHPaJx4voAE4m0Kex/EDUzz4nEDEEdAkS/P60mGE0I4V82loN4edqR0Z9kzsd0MLGfDsQbNNuRWd4iybwJhp8HfjzK871xPS0mhag7nPiXj760LJTCNF58frPDx3qoNaKMFCZ1fwZDzvVbN4KeME+jyQQb2z8R8Fq6wGSYGZpmoPA/CfsKuUf95+imMHGnikeVtM1mRDLlVmTWiMYOKiNpKyiCoK5hAqIIlMs6Id6lSFHIXU52hor+vQnc2drp0UIlsS8GX5B+KkZE2Aww421M7VQtJ1bTyddofwdTGF+XAKi1OgItUWDEfosDjYgri/DnJVvPCIG1eI+tt9JSqHiawxGWtfNFeRyMUgq0okplCoFH1qYA7TQX7OIqqO4QNrbZAz1X2bjlFVzAc2PU5CZxhh3jQ9pZVDung1v3nkKSeH+EGjL5cgRIXS9/OOm7VZVc7gfihD7p8oEj0eRAikdb5yMBwBm/CRj9GL4BMhfC0soCFDwEeoBJn5JgyhVKSfPJWItPAeoBpIfIyFmHXgQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sHwzrBLBn9rpCP5F99diY4YK3vC8L425obU9PTlH/f+1g00K/hCPds1Bml38lPgV4FyTSZCaC9PwJlX5w13e38467ib8wtQ8docEO2S4uLaPoDB745MBlD3Q4oe2E3G/iY3OFtBQh4CeZULBfqVf+VYRkJV2jBN6OZOkqap4aOhRMNbZych7lI210JQISxIo+H9tiQg+obwYP9bhdXyrS32C9D+xT8kzrjx3JnKigRM+JWEOATWxl0XxtDmw0whErcHP9TAU6Zj3s0+VatPYjWxV+qtwqUyM/OXXPu/6QVSXrAyKJkJxZBJw7j4R7BlFxnytmc3eu8qaDNoAAtHxAR6TyT/3teTXPjYh7hBuf/NUE/IfNABHNWZ6AFkMc+0fVEfCLhxt8cnirPlI0/oVGaduTFshzRDMavMzNo1ONImzTQRz0PVOKIucLDik+qx7 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2026 16:33:35.9374 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 232739cd-2f16-447f-3504-08de7c6747c4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002327.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5922 Content-Type: text/plain; charset="utf-8" Originally, the SMCA bank type enums were ordered based on processor documentation. However, the ordering became inconsistent after new bank types were added over time. Sort the bank type enums alphanumerically in most places. Sort the "enum to HWID/McaType" mapping by HWID/McaType. Drop redundant code comments. Signed-off-by: Yazen Ghannam --- arch/x86/include/asm/mce.h | 48 ++++++++------- arch/x86/kernel/cpu/mce/amd.c | 110 +++++++++++++++++----------------- drivers/edac/mce_amd.c | 38 ++++++------ 3 files changed, 99 insertions(+), 97 deletions(-) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 2d98886de09a..83899711da4e 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -345,42 +345,46 @@ extern void apei_mce_report_mem_error(int corrected, =20 /* These may be used by multiple smca_hwid_mcatypes */ enum smca_bank_types { - SMCA_LS =3D 0, /* Load Store */ - SMCA_LS_V2, - SMCA_IF, /* Instruction Fetch */ - SMCA_L2_CACHE, /* L2 Cache */ + /* + * Keep in alphanumeric order, numerals before letters. + * Exception: Keep "V2, etc." with their originals. + */ + SMCA_CS, /* Coherent Slave */ + SMCA_CS_V2, SMCA_DE, /* Decoder Unit */ - SMCA_RESERVED, /* Reserved */ SMCA_EX, /* Execution Unit */ SMCA_FP, /* Floating Point */ + SMCA_GMI_PCS, /* GMI PCS Unit */ + SMCA_GMI_PHY, /* GMI PHY Unit */ + SMCA_IF, /* Instruction Fetch */ + SMCA_L2_CACHE, /* L2 Cache */ SMCA_L3_CACHE, /* L3 Cache */ - SMCA_CS, /* Coherent Slave */ - SMCA_CS_V2, - SMCA_PIE, /* Power, Interrupts, etc. */ - SMCA_UMC, /* Unified Memory Controller */ - SMCA_UMC_V2, + SMCA_LS, /* Load Store */ + SMCA_LS_V2, SMCA_MA_LLC, /* Memory Attached Last Level Cache */ - SMCA_PB, /* Parameter Block */ - SMCA_PSP, /* Platform Security Processor */ - SMCA_PSP_V2, - SMCA_SMU, /* System Management Unit */ - SMCA_SMU_V2, SMCA_MP5, /* Microprocessor 5 Unit */ SMCA_MPDMA, /* MPDMA Unit */ + SMCA_NBIF, /* NBIF Unit */ SMCA_NBIO, /* Northbridge IO Unit */ + SMCA_PB, /* Parameter Block */ SMCA_PCIE, /* PCI Express Unit */ SMCA_PCIE_V2, - SMCA_XGMI_PCS, /* xGMI PCS Unit */ - SMCA_NBIF, /* NBIF Unit */ - SMCA_SHUB, /* System HUB Unit */ + SMCA_PIE, /* Power, Interrupts, etc. */ + SMCA_PSP, /* Platform Security Processor */ + SMCA_PSP_V2, + SMCA_RESERVED, /* Reserved */ SMCA_SATA, /* SATA Unit */ + SMCA_SHUB, /* System HUB Unit */ + SMCA_SMU, /* System Management Unit */ + SMCA_SMU_V2, + SMCA_UMC, /* Unified Memory Controller */ + SMCA_UMC_V2, SMCA_USB, /* USB Unit */ - SMCA_USR_DP, /* Ultra Short Reach Data Plane Controller */ SMCA_USR_CP, /* Ultra Short Reach Control Plane Controller */ - SMCA_GMI_PCS, /* GMI PCS Unit */ - SMCA_XGMI_PHY, /* xGMI PHY Unit */ + SMCA_USR_DP, /* Ultra Short Reach Data Plane Controller */ SMCA_WAFL_PHY, /* WAFL PHY Unit */ - SMCA_GMI_PHY, /* GMI PHY Unit */ + SMCA_XGMI_PCS, /* xGMI PCS Unit */ + SMCA_XGMI_PHY, /* xGMI PHY Unit */ N_SMCA_BANK_TYPES }; =20 diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index da13c1e37f87..44e490119b89 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -95,39 +95,39 @@ static DEFINE_PER_CPU_READ_MOSTLY(struct smca_bank[MAX_= NR_BANKS], smca_banks); static DEFINE_PER_CPU_READ_MOSTLY(u8[N_SMCA_BANK_TYPES], smca_bank_counts); =20 static const char * const smca_names[] =3D { - [SMCA_LS ... SMCA_LS_V2] =3D "load_store", - [SMCA_IF] =3D "insn_fetch", - [SMCA_L2_CACHE] =3D "l2_cache", + [SMCA_CS ... SMCA_CS_V2] =3D "coherent_slave", [SMCA_DE] =3D "decode_unit", - [SMCA_RESERVED] =3D "reserved", [SMCA_EX] =3D "execution_unit", [SMCA_FP] =3D "floating_point", + [SMCA_GMI_PCS] =3D "gmi_pcs", + [SMCA_GMI_PHY] =3D "gmi_phy", + [SMCA_IF] =3D "insn_fetch", + [SMCA_L2_CACHE] =3D "l2_cache", [SMCA_L3_CACHE] =3D "l3_cache", - [SMCA_CS ... SMCA_CS_V2] =3D "coherent_slave", - [SMCA_PIE] =3D "pie", - - /* UMC v2 is separate because both of them can exist in a single system. = */ - [SMCA_UMC] =3D "umc", - [SMCA_UMC_V2] =3D "umc_v2", + [SMCA_LS ... SMCA_LS_V2] =3D "load_store", [SMCA_MA_LLC] =3D "ma_llc", - [SMCA_PB] =3D "param_block", - [SMCA_PSP ... SMCA_PSP_V2] =3D "psp", - [SMCA_SMU ... SMCA_SMU_V2] =3D "smu", [SMCA_MP5] =3D "mp5", [SMCA_MPDMA] =3D "mpdma", + [SMCA_NBIF] =3D "nbif", [SMCA_NBIO] =3D "nbio", + [SMCA_PB] =3D "param_block", [SMCA_PCIE ... SMCA_PCIE_V2] =3D "pcie", - [SMCA_XGMI_PCS] =3D "xgmi_pcs", - [SMCA_NBIF] =3D "nbif", - [SMCA_SHUB] =3D "shub", + [SMCA_PIE] =3D "pie", + [SMCA_PSP ... SMCA_PSP_V2] =3D "psp", + [SMCA_RESERVED] =3D "reserved", [SMCA_SATA] =3D "sata", + [SMCA_SHUB] =3D "shub", + [SMCA_SMU ... SMCA_SMU_V2] =3D "smu", + + /* UMC v2 is separate because both of them can exist in a single system. = */ + [SMCA_UMC] =3D "umc", + [SMCA_UMC_V2] =3D "umc_v2", [SMCA_USB] =3D "usb", - [SMCA_USR_DP] =3D "usr_dp", [SMCA_USR_CP] =3D "usr_cp", - [SMCA_GMI_PCS] =3D "gmi_pcs", - [SMCA_XGMI_PHY] =3D "xgmi_phy", + [SMCA_USR_DP] =3D "usr_dp", [SMCA_WAFL_PHY] =3D "wafl_phy", - [SMCA_GMI_PHY] =3D "gmi_phy", + [SMCA_XGMI_PCS] =3D "xgmi_pcs", + [SMCA_XGMI_PHY] =3D "xgmi_phy", }; =20 static const char *smca_get_name(enum smca_bank_types t) @@ -153,67 +153,65 @@ enum smca_bank_types smca_get_bank_type(unsigned int = cpu, unsigned int bank) } EXPORT_SYMBOL_GPL(smca_get_bank_type); =20 +/* Order by HWID then McaType with newline between HWID groups. */ static const struct smca_hwid smca_hwid_mcatypes[] =3D { /* { bank_type, hwid_mcatype } */ =20 - /* Reserved type */ { SMCA_RESERVED, HWID_MCATYPE(0x00, 0x0) }, =20 - /* ZN Core (HWID=3D0xB0) MCA types */ - { SMCA_LS, HWID_MCATYPE(0xB0, 0x0) }, - { SMCA_LS_V2, HWID_MCATYPE(0xB0, 0x10) }, - { SMCA_IF, HWID_MCATYPE(0xB0, 0x1) }, - { SMCA_L2_CACHE, HWID_MCATYPE(0xB0, 0x2) }, - { SMCA_DE, HWID_MCATYPE(0xB0, 0x3) }, - /* HWID 0xB0 MCATYPE 0x4 is Reserved */ - { SMCA_EX, HWID_MCATYPE(0xB0, 0x5) }, - { SMCA_FP, HWID_MCATYPE(0xB0, 0x6) }, - { SMCA_L3_CACHE, HWID_MCATYPE(0xB0, 0x7) }, - - /* Data Fabric MCA types */ - { SMCA_CS, HWID_MCATYPE(0x2E, 0x0) }, - { SMCA_PIE, HWID_MCATYPE(0x2E, 0x1) }, - { SMCA_CS_V2, HWID_MCATYPE(0x2E, 0x2) }, - { SMCA_MA_LLC, HWID_MCATYPE(0x2E, 0x4) }, - - /* Unified Memory Controller MCA type */ - { SMCA_UMC, HWID_MCATYPE(0x96, 0x0) }, - { SMCA_UMC_V2, HWID_MCATYPE(0x96, 0x1) }, - - /* Parameter Block MCA type */ - { SMCA_PB, HWID_MCATYPE(0x05, 0x0) }, - - /* Platform Security Processor MCA type */ - { SMCA_PSP, HWID_MCATYPE(0xFF, 0x0) }, - { SMCA_PSP_V2, HWID_MCATYPE(0xFF, 0x1) }, - - /* System Management Unit MCA type */ { SMCA_SMU, HWID_MCATYPE(0x01, 0x0) }, { SMCA_SMU_V2, HWID_MCATYPE(0x01, 0x1) }, - - /* Microprocessor 5 Unit MCA type */ { SMCA_MP5, HWID_MCATYPE(0x01, 0x2) }, - - /* MPDMA MCA type */ { SMCA_MPDMA, HWID_MCATYPE(0x01, 0x3) }, =20 - /* Northbridge IO Unit MCA type */ + { SMCA_PB, HWID_MCATYPE(0x05, 0x0) }, + { SMCA_NBIO, HWID_MCATYPE(0x18, 0x0) }, =20 - /* PCI Express Unit MCA type */ + { SMCA_CS, HWID_MCATYPE(0x2E, 0x0) }, + { SMCA_PIE, HWID_MCATYPE(0x2E, 0x1) }, + { SMCA_CS_V2, HWID_MCATYPE(0x2E, 0x2) }, + { SMCA_MA_LLC, HWID_MCATYPE(0x2E, 0x4) }, + { SMCA_PCIE, HWID_MCATYPE(0x46, 0x0) }, { SMCA_PCIE_V2, HWID_MCATYPE(0x46, 0x1) }, =20 { SMCA_XGMI_PCS, HWID_MCATYPE(0x50, 0x0) }, + { SMCA_NBIF, HWID_MCATYPE(0x6C, 0x0) }, + { SMCA_SHUB, HWID_MCATYPE(0x80, 0x0) }, + + { SMCA_UMC, HWID_MCATYPE(0x96, 0x0) }, + { SMCA_UMC_V2, HWID_MCATYPE(0x96, 0x1) }, + { SMCA_SATA, HWID_MCATYPE(0xA8, 0x0) }, + { SMCA_USB, HWID_MCATYPE(0xAA, 0x0) }, + + { SMCA_LS, HWID_MCATYPE(0xB0, 0x0) }, + { SMCA_IF, HWID_MCATYPE(0xB0, 0x1) }, + { SMCA_L2_CACHE, HWID_MCATYPE(0xB0, 0x2) }, + { SMCA_DE, HWID_MCATYPE(0xB0, 0x3) }, + /* HWID 0xB0 MCATYPE 0x4 is Reserved */ + { SMCA_EX, HWID_MCATYPE(0xB0, 0x5) }, + { SMCA_FP, HWID_MCATYPE(0xB0, 0x6) }, + { SMCA_L3_CACHE, HWID_MCATYPE(0xB0, 0x7) }, + { SMCA_LS_V2, HWID_MCATYPE(0xB0, 0x10) }, + + { SMCA_PSP, HWID_MCATYPE(0xFF, 0x0) }, + { SMCA_PSP_V2, HWID_MCATYPE(0xFF, 0x1) }, + { SMCA_USR_DP, HWID_MCATYPE(0x170, 0x0) }, + { SMCA_USR_CP, HWID_MCATYPE(0x180, 0x0) }, + { SMCA_GMI_PCS, HWID_MCATYPE(0x241, 0x0) }, + { SMCA_XGMI_PHY, HWID_MCATYPE(0x259, 0x0) }, + { SMCA_WAFL_PHY, HWID_MCATYPE(0x267, 0x0) }, + { SMCA_GMI_PHY, HWID_MCATYPE(0x269, 0x0) }, }; =20 diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index af3c12284a1e..7fba230cb9e1 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c @@ -689,36 +689,36 @@ static void decode_mc6_mce(struct mce *m) } =20 static const char * const smca_long_names[] =3D { - [SMCA_LS ... SMCA_LS_V2] =3D "Load Store Unit", - [SMCA_IF] =3D "Instruction Fetch Unit", - [SMCA_L2_CACHE] =3D "L2 Cache", + [SMCA_CS ... SMCA_CS_V2] =3D "Coherent Slave", [SMCA_DE] =3D "Decode Unit", - [SMCA_RESERVED] =3D "Reserved", [SMCA_EX] =3D "Execution Unit", [SMCA_FP] =3D "Floating Point Unit", + [SMCA_GMI_PCS] =3D "Global Memory Interconnect PCS Unit", + [SMCA_GMI_PHY] =3D "Global Memory Interconnect PHY Unit", + [SMCA_IF] =3D "Instruction Fetch Unit", + [SMCA_L2_CACHE] =3D "L2 Cache", [SMCA_L3_CACHE] =3D "L3 Cache", - [SMCA_CS ... SMCA_CS_V2] =3D "Coherent Slave", - [SMCA_PIE] =3D "Power, Interrupts, etc.", - - /* UMC v2 is separate because both of them can exist in a single system. = */ - [SMCA_UMC] =3D "Unified Memory Controller", - [SMCA_UMC_V2] =3D "Unified Memory Controller v2", - [SMCA_PB] =3D "Parameter Block", - [SMCA_PSP ... SMCA_PSP_V2] =3D "Platform Security Processor", - [SMCA_SMU ... SMCA_SMU_V2] =3D "System Management Unit", + [SMCA_LS ... SMCA_LS_V2] =3D "Load Store Unit", [SMCA_MP5] =3D "Microprocessor 5 Unit", [SMCA_MPDMA] =3D "MPDMA Unit", + [SMCA_NBIF] =3D "NBIF Unit", [SMCA_NBIO] =3D "Northbridge IO Unit", + [SMCA_PB] =3D "Parameter Block", [SMCA_PCIE ... SMCA_PCIE_V2] =3D "PCI Express Unit", - [SMCA_XGMI_PCS] =3D "Ext Global Memory Interconnect PCS Unit", - [SMCA_NBIF] =3D "NBIF Unit", - [SMCA_SHUB] =3D "System Hub Unit", + [SMCA_PIE] =3D "Power, Interrupts, etc.", + [SMCA_PSP ... SMCA_PSP_V2] =3D "Platform Security Processor", + [SMCA_RESERVED] =3D "Reserved", [SMCA_SATA] =3D "SATA Unit", + [SMCA_SHUB] =3D "System Hub Unit", + [SMCA_SMU ... SMCA_SMU_V2] =3D "System Management Unit", + + /* UMC v2 is separate because both of them can exist in a single system. = */ + [SMCA_UMC] =3D "Unified Memory Controller", + [SMCA_UMC_V2] =3D "Unified Memory Controller v2", [SMCA_USB] =3D "USB Unit", - [SMCA_GMI_PCS] =3D "Global Memory Interconnect PCS Unit", - [SMCA_XGMI_PHY] =3D "Ext Global Memory Interconnect PHY Unit", [SMCA_WAFL_PHY] =3D "WAFL PHY Unit", - [SMCA_GMI_PHY] =3D "Global Memory Interconnect PHY Unit", + [SMCA_XGMI_PCS] =3D "Ext Global Memory Interconnect PCS Unit", + [SMCA_XGMI_PHY] =3D "Ext Global Memory Interconnect PHY Unit", }; =20 static const char *smca_get_long_name(enum smca_bank_types t) --=20 2.53.0 From nobody Thu Apr 9 15:10:25 2026 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazon11013005.outbound.protection.outlook.com [40.93.201.5]) (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 4DF38371D03; Sat, 7 Mar 2026 16:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.201.5 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901221; cv=fail; b=DJ2btlWvS11Hd81qZiQQUABKUxfJ4soYRI1pMRCvqmWIjPLteg4BwzQwzHhxNAw6M3WT0eGIgHDl43gOyEjNc5ERQbNLcE6DP9NgLQ3vcdb13XRicjTRLfPlH+Ee36IFsb3Bi5UQiA11va0La4DZLx9cURzumSTnllI424Q/TmE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901221; c=relaxed/simple; bh=e87hwHE1PaDlvak4MCZ4emXmoKtFFfIWGRQnwJFQuv4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O3rQh5/Kwic+2agjyB911W+0aN5pohYCZGzC2OloKInwFSPTK72nvj/kvkUoS7jIY53eiv/I4ym+irgZ8bmCc63PVQbq9cG5AJHuQVT1gyk4NerOD2n1/rL4cE3TLxyoh/TFYZZWdwKGGvt1w+KMtJn9HO9tkRoM9FQpGhpClt0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=v3AYI6Vl; arc=fail smtp.client-ip=40.93.201.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="v3AYI6Vl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cilLsPhgCtwdfR926n1uh142ET+OkVCY5uHe8/dsUuGR8eRt9c9PBnYR/8dBkDRxUJn2ux7VPHPPz5kuEddsT2iWBZxozPBn2iRGkYIQsjHyzUe8bjXVRp9cpaeqjpDoj4odN1y0zYTAEUtjnSJIC7HBKLTgSGyd0hP/M1FC+UBKmTVYVt0EPpuDN2ZMiszKiBEdExA9ZdX0FuA3frKfVCb5hWYQN2SWgYM+MwfXWksfDCfG2VQoBarThWPPk0w+5iE93039a+r17SUNH1DShYSEdTNMXPascGT0MmfCY0KXUJo2lG5W3U/RAKZTr2GehEbS4Y3jcxwEnlyoVAM3ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eiAyG3wK7FJ+dBISAERu7PCZ6NydOzZFBe+YR81zXMQ=; b=BT1caeLfUA6GKy1l9Wd+BC1g6yuIhcHdRoKv6iI6OO75SmsvlnJbvHWvQ/jS4qag61EUm6XRAtF37Pm/L/2AWldM3P3kp4GGZeVqBs2X6/V0hLMFdGOadGyTxwOyLgccoP2L52+c1go8HW6MyFxuqDMHk6y/Wpeve7w7Cu5+QlbQZnye256iCGLnrmwIn8yCx0FawsrqUPp/ukkYbjJXc+frty4HeLtmBcmF2MBIxpbFL6DPx1MSZK2emQ/5IAqWGohUhiAgx0WLmfk9a5OtBHe1XeSeYH/XYepOrn539PvFf4S4vd4PPHKh8Aqdk2pRZZRomeehGAIDM8Tl28yqVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eiAyG3wK7FJ+dBISAERu7PCZ6NydOzZFBe+YR81zXMQ=; b=v3AYI6Vl4G+X52kIYBtM5AwXbVJPZAvAvhYGEDkLtcQ54Xm99SRK5KDD9cRUDzpzsrNfnsHiMxO3q5BkOiVyHoEmSHZyXAJG19U7IBxhbEyIHpORZ17g5kBXoAyhGfXeJNYFSiqxLjEKLxDsZe4xaAQ3IEZJzEawIJWJ3yZlR2A= Received: from SJ0PR03CA0180.namprd03.prod.outlook.com (2603:10b6:a03:338::35) by CH2PR12MB9520.namprd12.prod.outlook.com (2603:10b6:610:280::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9700.5; Sat, 7 Mar 2026 16:33:37 +0000 Received: from SJ1PEPF00002327.namprd03.prod.outlook.com (2603:10b6:a03:338:cafe::70) by SJ0PR03CA0180.outlook.office365.com (2603:10b6:a03:338::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Sat, 7 Mar 2026 16:33:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002327.mail.protection.outlook.com (10.167.242.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Sat, 7 Mar 2026 16:33:37 +0000 Received: from yaz-khff2.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Sat, 7 Mar 2026 10:33:34 -0600 From: Yazen Ghannam To: CC: , , , Yazen Ghannam Subject: [PATCH v2 2/3] x86/mce, EDAC/mce_amd: Update CS bank type naming Date: Sat, 7 Mar 2026 11:33:15 -0500 Message-ID: <20260307163316.345923-3-yazen.ghannam@amd.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260307163316.345923-1-yazen.ghannam@amd.com> References: <20260307163316.345923-1-yazen.ghannam@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002327:EE_|CH2PR12MB9520:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c48d4e1-51c1-46d3-91cd-08de7c674876 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700016|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: IIiFKvC5gckT8tP706AS11f7gkg9mW5B8RMpwYLM5c3Ka5rqLUdZKmfQHRtg9okBlnlpcXU9z8GRdkpmyrPRPTkvCbTOKh2gvjjkodQpu3c9z/rXlnV46BXhi97EV3pFoOGaXQUnzkt5IDws8X+SJpvoSPWLkLjvH17u+UcJ4t2jC6hWUF9t2Gybx9dG/GNBVQqI9+bpc82jI4L2Yn7/7yPR3rlRXsiR4yATM86IDh75PYa5OdOZc7R2PKiN9dbCZwwgmnqWv51ZavojhAnXwMrd3Xaj+Ocs+7mI8ikzR5/WzhJHB08Ya7UNkd8HxnKNOhErvQTsdHcTf+T//jlolJ+8PglZq7HCYneb8TFuWGjHjlsIeeQ4Zoxt/WYTKO5ykXFYx47ECttbN0vkarYFTlo8ZV0JW141RPhBgkwz48TYEI+xQKDgWhRiWgBICPh4OxnyGXSPpVxsBRL2PVtf9W06/PRIKH5OgVQtOCbJUGOrcKwC7c2LTN+wdvKVY8BYoysmUOt5j21Z1pp9Sxv/7cCc11ilo4gbpN5dkUTFZ/NAiU2no7NpJIVVd14JepwGFcdJf/LZoAeA0LydbaYXPzjaZnZhFAPIg8noLfKaLdH/Zjk/1VGwr65lQ9ohtJsDGYTJ9y4gCcEe8qtWQ53r/6yVoj4xvPZAcZcttoW50pDgPRVMDI9dUjG9QeB3KK+VpmPCIwSeQAo1utW72HXr95acHEYbqM+5NfsElQE1pyYGFXa9fYZHHink/a23mj2d7Lzy90j5Kh/TM4GvyeJV6g== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700016)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SatMQiY2HIxLy1XGqyFa67zlYkamvOzBaasIHOVh8+ZtTQvwKFJ5EwIbT03EqBLqOzVDM/TT2qJwmaAB/w04C96TgXgKDrPuyOEATNHwNpk4rK/IfnuDO2PcaBN+yAVpP3m0dPGCbC1cc7B50zBiHXHaJladzOUyUsAS3iT0jqP3Che3w/oEXK12TdPU45cyeFWqar6iZM9+9JtFnKGiPCTc7rM1Do/Ev6JE/62hwRLQ2uO0aFY+AyFHYpX6e6oINSPpMNUwCZ8UqOcVT0FppBGEee+2UQi5uHtvRDJcK3OsgEbRM6noGUY6/7DI9iNUHWdPMHYdjH8gue4uMWxfrO+WUTDoFm1UBYLqRikvC0FKxdzQ+LKHceJ4MBJCbJAaOFBzsMoXxUsSXWwl/l/cwM4r6sTv8wZHFIudiBv7dsr7KysdQKvFnHmYFv1ww8Ym X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2026 16:33:37.1057 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c48d4e1-51c1-46d3-91cd-08de7c674876 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002327.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB9520 Content-Type: text/plain; charset="utf-8" Recent documentation updated the "CS" bank type name from "Coherent Slave" to "Coherent Station". Apply this change in the kernel also. Signed-off-by: Yazen Ghannam --- arch/x86/include/asm/mce.h | 2 +- arch/x86/kernel/cpu/mce/amd.c | 2 +- drivers/edac/mce_amd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 83899711da4e..576a4b6e83ea 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -349,7 +349,7 @@ enum smca_bank_types { * Keep in alphanumeric order, numerals before letters. * Exception: Keep "V2, etc." with their originals. */ - SMCA_CS, /* Coherent Slave */ + SMCA_CS, /* Coherent Station */ SMCA_CS_V2, SMCA_DE, /* Decoder Unit */ SMCA_EX, /* Execution Unit */ diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 44e490119b89..86f51415283c 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -95,7 +95,7 @@ static DEFINE_PER_CPU_READ_MOSTLY(struct smca_bank[MAX_NR= _BANKS], smca_banks); static DEFINE_PER_CPU_READ_MOSTLY(u8[N_SMCA_BANK_TYPES], smca_bank_counts); =20 static const char * const smca_names[] =3D { - [SMCA_CS ... SMCA_CS_V2] =3D "coherent_slave", + [SMCA_CS ... SMCA_CS_V2] =3D "coherent_station", [SMCA_DE] =3D "decode_unit", [SMCA_EX] =3D "execution_unit", [SMCA_FP] =3D "floating_point", diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index 7fba230cb9e1..54ad56f2a9e0 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c @@ -689,7 +689,7 @@ static void decode_mc6_mce(struct mce *m) } =20 static const char * const smca_long_names[] =3D { - [SMCA_CS ... SMCA_CS_V2] =3D "Coherent Slave", + [SMCA_CS ... SMCA_CS_V2] =3D "Coherent Station", [SMCA_DE] =3D "Decode Unit", [SMCA_EX] =3D "Execution Unit", [SMCA_FP] =3D "Floating Point Unit", --=20 2.53.0 From nobody Thu Apr 9 15:10:25 2026 Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011040.outbound.protection.outlook.com [40.107.208.40]) (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 521523A640F; Sat, 7 Mar 2026 16:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.208.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901224; cv=fail; b=ZVYvsGWPXKIqYbf3gDyP1R/3lmeiPU/DiveaW4HIMaJudgZNW2sxiNM8IT/OcYViPdIeZOJ//eOXW+pv2Bh6ruYzFM/ZBUy4aISjIg8QepR+6jH4W/hmJcpUm2CjlY+idyo9dahsfIucIVHMLnMeJS9GiUFWDmx7QKh84CROwMk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772901224; c=relaxed/simple; bh=pyfTYbvRvvziyZrHWQ4/FbJxUbXjyVjRRUq5I4mxpXc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Jxk0IIKbxqm/JvR/ejr/zo5kWeqk8VtIK6UrcvjIxnK/YK0oRP81Y7iE3rzWmilIQNgTZMbMJL6W/ZzX/YbkOzdv7KEC4Oyj7ovVnYyd2fiO3Ju2XY0a/d1WcO2eJqRCMqpVV8scU4SuupMDvyefY4uF7k08IJ1CE9K+4SBxKjc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=PPWFtc/X; arc=fail smtp.client-ip=40.107.208.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="PPWFtc/X" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Yj51B1bzjJZXs2+4MkMCubnnMQPRuXnzK0iDPdsi+h6JAcBeAoaCemc2t1S7RPzXm6fG8hm1f3wlIlsk2ZcGt/q01qeu/x9gLr8ZFge+r+4dxkJh4VrT1xSIZTzB8TY63yyTfh2pbojlS95sBvaDUWSwRh4WLxPxlyRZ6DLBl/aceC2IsInuUAAiILrQYkN5+u4ZC08QMhRAmPsBNEtQYhotolRFsHgRtUmlLJOsNZMjHiFfOrcjRSSwXPLlSw4YT2YgIT87QRB1Guvpu9wmrEzsQUxLfYvQ83IIFrCgAVW4dVRDY8JF7XBcGLl7ZnjMxnj2P/yhEJJVcvjDwo9HUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TK99qf/ors4i/bTVLhvOuft0NPYgNSyv8q7p1ZOjDCE=; b=cGxSwo9HtxpB2Lg2VSSA1qZAMPtvr6j4EX05ayQWCOryIJU8ueJAoIQwD4te3A1ru4MTuRMoVQj/aw+dN2LXZh6GXYRkrkFhnhKYLyHZDTbmu/X73ZdSJ+E/c3gGUZz9vtxRFyCd43UY01xavgbR29if5O1oz6OgJR3c8pdxWfK7VS3Pl60oi1kLmDF3+v6YHkwiV5TxE197d0AIVJaqd6kNkzqmfGyb7eQJpE2jcvP2ULS+pQdMLsxlnBxIsyRWZbYdqmDsmYCqzjgNmxRvtOewYCSzg7uEGGZXeIiFxuRpA1cRlwcAffNjH9Hok2SfPB/zb7FPUCoUAsCao1YLSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TK99qf/ors4i/bTVLhvOuft0NPYgNSyv8q7p1ZOjDCE=; b=PPWFtc/XK26X+UrxrMAiLsdWUgw2mv2DjM7rNB1XLAudQXvTOcuQvBRKJlfeJY1NXnkvxwj1sgeSIdJmXJKf9QjcHf+BK1meTwFMpwLOupC12ThVZ4tuE37N/ux8Yg5fDEV4db/uzT8xgiD+kaQD7GS9d5N+1nso/oAZx3+04e4= Received: from SJ0PR03CA0154.namprd03.prod.outlook.com (2603:10b6:a03:338::9) by MN2PR12MB4270.namprd12.prod.outlook.com (2603:10b6:208:1d9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Sat, 7 Mar 2026 16:33:38 +0000 Received: from SJ1PEPF00002327.namprd03.prod.outlook.com (2603:10b6:a03:338:cafe::59) by SJ0PR03CA0154.outlook.office365.com (2603:10b6:a03:338::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Sat, 7 Mar 2026 16:33:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SJ1PEPF00002327.mail.protection.outlook.com (10.167.242.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Sat, 7 Mar 2026 16:33:38 +0000 Received: from yaz-khff2.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Sat, 7 Mar 2026 10:33:35 -0600 From: Yazen Ghannam To: CC: , , , Yazen Ghannam Subject: [PATCH v2 3/3] x86/mce, EDAC/mce_amd: Add new SMCA bank types Date: Sat, 7 Mar 2026 11:33:16 -0500 Message-ID: <20260307163316.345923-4-yazen.ghannam@amd.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260307163316.345923-1-yazen.ghannam@amd.com> References: <20260307163316.345923-1-yazen.ghannam@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002327:EE_|MN2PR12MB4270:EE_ X-MS-Office365-Filtering-Correlation-Id: 87bf9fa2-6b93-4893-8fa4-08de7c674901 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: uhiV9Xt5LiuhIsNJTFd3DrQtPlN53LgenLuCuKzPi2JZM4Io6LYldt3b1TpDB8xEbxPo9lZraRUSq2foYuGC+r+VZyvNYjP0Zx2FIoTGlUVErlsUM4wkxnA3rOFfZRJfvKB+iRCeuFnF4Nt5z3146hHvEej55KMJ7tXi11rlWxYEj/UV1mEz+bYUpbcSatGPIEbnGrcPiRzbXQtz7qsz/qmuT8FopRlSmB+T8bTtcep+JZxJ94fhmFMtbJFVbau6HVFqExnhHxyTGCmzgFIgEa+uBXOks8s7+rNzhRhvChJNOM7+haXVOCeI6PuphVNyIhJ2E8mj2AtfUP0Vjw8/KC2rUoUnHjkIyIOfQmAlvzcnTRkNDn3btX7oSti9ZEGEYmBnqreAXcjuyzaCbNiRq1TlegZgFyJLy5boVn3p1k9z6I7VZc+oCVptLQxpM3EQx3CgHMATld5eSTCkXVMcr5F1D/tq11V1thHTSvvvmwKRTO5M/97S3M1m3YKeyGdv3/y0s2G3d7MCOdLPAmKpoIXXFgmpBZpuNnaCc9EzkyT5H7i848/Nl6QETyCsc3x84xygZ2annQ3h9tXq08rdTWdnYLJ0Ctoq61v1Dmc32l6dpZFzuaA/O8iMROBuHWS39CroJOKqR1am9PieDl8wQqJm5MJz8Q2GG+ilUDD7UdmZPLbZmtRjSPu88YGcJa6KSYh6H4Sx1rnwGKrGJH/gNucg1ZMWYQJ/SXiaq8Hg6R+4P9TF+IOQIf0rRY3DQIQel9jbg+ZO/WAKuUYw92fL4Q== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r525z77TK1tWmiJ+JhQfj6TDEwbX9z1qiuJrLXAQTMXUNYY1X798Fo1Bg2SBUpNVdFuz/BxLTrR3rNrhvNUB2vBW2iU9aCGqQSP++yOxoj3I8h1d4ScKRaRdWeDifVByrmCBVwJuf8dwLb4Ds5u8tvwt3R8/ho/lIXIj66PkcOpdylh8KyhCszCXRYMczTpwezX0GznITj7G+55DJrMMnVHT4kAJIqqpASTdILfLT5jTlPZzYbm26VP0/Imxbjyu4AadGr6CJ4/ZRAD/3FX7UQekenQmh2VYtTc7eiTMLYGTMi9GYda1/21n0ibho6hdANYo7ylSs9uqDGOKwbXp2fvW+n8JkH4+B0bBl+9Nv8iDibbUm3Ri63CDk4sT5EuJniMnSEaThCFnreIT0m9UQwama33uhwZF6Xf4Kx4eeYtkbFRr03SldBQFjDRroQ07 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2026 16:33:38.0157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87bf9fa2-6b93-4893-8fa4-08de7c674901 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002327.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4270 Content-Type: text/plain; charset="utf-8" Recognize new SMCA bank types and include their short names for sysfs and long names for decoding. Signed-off-by: Yazen Ghannam --- arch/x86/include/asm/mce.h | 11 +++++++++++ arch/x86/kernel/cpu/mce/amd.c | 30 ++++++++++++++++++++++++++++++ drivers/edac/mce_amd.c | 10 ++++++++++ 3 files changed, 51 insertions(+) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 576a4b6e83ea..e4d0fc0978ac 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -351,7 +351,10 @@ enum smca_bank_types { */ SMCA_CS, /* Coherent Station */ SMCA_CS_V2, + SMCA_DACC_BE, /* Data Acceleration Back-end */ + SMCA_DACC_FE, /* Data Acceleration Front-end */ SMCA_DE, /* Decoder Unit */ + SMCA_EDDR5CMN, /* eDDR5 CMN */ SMCA_EX, /* Execution Unit */ SMCA_FP, /* Floating Point */ SMCA_GMI_PCS, /* GMI PCS Unit */ @@ -363,12 +366,19 @@ enum smca_bank_types { SMCA_LS_V2, SMCA_MA_LLC, /* Memory Attached Last Level Cache */ SMCA_MP5, /* Microprocessor 5 Unit */ + SMCA_MPART, /* AMD Root of Trust Microprocessor */ + SMCA_MPASP, /* AMD Secure Processor */ + SMCA_MPASP_V2, + SMCA_MPDACC, /* MP for Data Acceleration */ SMCA_MPDMA, /* MPDMA Unit */ + SMCA_MPM, /* Microprocessor Manageability Core */ + SMCA_MPRAS, /* MP for RAS */ SMCA_NBIF, /* NBIF Unit */ SMCA_NBIO, /* Northbridge IO Unit */ SMCA_PB, /* Parameter Block */ SMCA_PCIE, /* PCI Express Unit */ SMCA_PCIE_V2, + SMCA_PCIE_PL, /* PCIe Link */ SMCA_PIE, /* Power, Interrupts, etc. */ SMCA_PSP, /* Platform Security Processor */ SMCA_PSP_V2, @@ -377,6 +387,7 @@ enum smca_bank_types { SMCA_SHUB, /* System HUB Unit */ SMCA_SMU, /* System Management Unit */ SMCA_SMU_V2, + SMCA_SSBDCI, /* Die to Die Interconnect */ SMCA_UMC, /* Unified Memory Controller */ SMCA_UMC_V2, SMCA_USB, /* USB Unit */ diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c index 86f51415283c..fc1513f8d180 100644 --- a/arch/x86/kernel/cpu/mce/amd.c +++ b/arch/x86/kernel/cpu/mce/amd.c @@ -96,7 +96,10 @@ static DEFINE_PER_CPU_READ_MOSTLY(u8[N_SMCA_BANK_TYPES],= smca_bank_counts); =20 static const char * const smca_names[] =3D { [SMCA_CS ... SMCA_CS_V2] =3D "coherent_station", + [SMCA_DACC_BE] =3D "dacc_be", + [SMCA_DACC_FE] =3D "dacc_fe", [SMCA_DE] =3D "decode_unit", + [SMCA_EDDR5CMN] =3D "eddr5_cmn", [SMCA_EX] =3D "execution_unit", [SMCA_FP] =3D "floating_point", [SMCA_GMI_PCS] =3D "gmi_pcs", @@ -107,17 +110,24 @@ static const char * const smca_names[] =3D { [SMCA_LS ... SMCA_LS_V2] =3D "load_store", [SMCA_MA_LLC] =3D "ma_llc", [SMCA_MP5] =3D "mp5", + [SMCA_MPART] =3D "mpart", + [SMCA_MPASP ... SMCA_MPASP_V2] =3D "mpasp", + [SMCA_MPDACC] =3D "mpdacc", [SMCA_MPDMA] =3D "mpdma", + [SMCA_MPM] =3D "mpm", + [SMCA_MPRAS] =3D "mpras", [SMCA_NBIF] =3D "nbif", [SMCA_NBIO] =3D "nbio", [SMCA_PB] =3D "param_block", [SMCA_PCIE ... SMCA_PCIE_V2] =3D "pcie", + [SMCA_PCIE_PL] =3D "pcie_pl", [SMCA_PIE] =3D "pie", [SMCA_PSP ... SMCA_PSP_V2] =3D "psp", [SMCA_RESERVED] =3D "reserved", [SMCA_SATA] =3D "sata", [SMCA_SHUB] =3D "shub", [SMCA_SMU ... SMCA_SMU_V2] =3D "smu", + [SMCA_SSBDCI] =3D "ssbdci", =20 /* UMC v2 is separate because both of them can exist in a single system. = */ [SMCA_UMC] =3D "umc", @@ -166,6 +176,8 @@ static const struct smca_hwid smca_hwid_mcatypes[] =3D { =20 { SMCA_PB, HWID_MCATYPE(0x05, 0x0) }, =20 + { SMCA_MPRAS, HWID_MCATYPE(0x12, 0x0) }, + { SMCA_NBIO, HWID_MCATYPE(0x18, 0x0) }, =20 { SMCA_CS, HWID_MCATYPE(0x2E, 0x0) }, @@ -178,6 +190,8 @@ static const struct smca_hwid smca_hwid_mcatypes[] =3D { =20 { SMCA_XGMI_PCS, HWID_MCATYPE(0x50, 0x0) }, =20 + { SMCA_SSBDCI, HWID_MCATYPE(0x5C, 0x0) }, + { SMCA_NBIF, HWID_MCATYPE(0x6C, 0x0) }, =20 { SMCA_SHUB, HWID_MCATYPE(0x80, 0x0) }, @@ -199,13 +213,29 @@ static const struct smca_hwid smca_hwid_mcatypes[] = =3D { { SMCA_L3_CACHE, HWID_MCATYPE(0xB0, 0x7) }, { SMCA_LS_V2, HWID_MCATYPE(0xB0, 0x10) }, =20 + { SMCA_MPDACC, HWID_MCATYPE(0xBE, 0x0) }, + + { SMCA_MPM, HWID_MCATYPE(0xF9, 0x0) }, + + { SMCA_MPASP, HWID_MCATYPE(0xFD, 0x0) }, + { SMCA_MPASP_V2, HWID_MCATYPE(0xFD, 0x1) }, + { SMCA_PSP, HWID_MCATYPE(0xFF, 0x0) }, { SMCA_PSP_V2, HWID_MCATYPE(0xFF, 0x1) }, + { SMCA_MPART, HWID_MCATYPE(0xFF, 0x2) }, + + { SMCA_DACC_FE, HWID_MCATYPE(0x157, 0x0) }, + + { SMCA_DACC_BE, HWID_MCATYPE(0x164, 0x0) }, =20 { SMCA_USR_DP, HWID_MCATYPE(0x170, 0x0) }, =20 { SMCA_USR_CP, HWID_MCATYPE(0x180, 0x0) }, =20 + { SMCA_EDDR5CMN, HWID_MCATYPE(0x1E0, 0x0) }, + + { SMCA_PCIE_PL, HWID_MCATYPE(0x1E1, 0x0) }, + { SMCA_GMI_PCS, HWID_MCATYPE(0x241, 0x0) }, =20 { SMCA_XGMI_PHY, HWID_MCATYPE(0x259, 0x0) }, diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c index 54ad56f2a9e0..bd252cb3c38e 100644 --- a/drivers/edac/mce_amd.c +++ b/drivers/edac/mce_amd.c @@ -690,7 +690,10 @@ static void decode_mc6_mce(struct mce *m) =20 static const char * const smca_long_names[] =3D { [SMCA_CS ... SMCA_CS_V2] =3D "Coherent Station", + [SMCA_DACC_BE] =3D "DACC Back-end Unit", + [SMCA_DACC_FE] =3D "DACC Front-end Unit", [SMCA_DE] =3D "Decode Unit", + [SMCA_EDDR5CMN] =3D "eDDR5 CMN Unit", [SMCA_EX] =3D "Execution Unit", [SMCA_FP] =3D "Floating Point Unit", [SMCA_GMI_PCS] =3D "Global Memory Interconnect PCS Unit", @@ -700,17 +703,24 @@ static const char * const smca_long_names[] =3D { [SMCA_L3_CACHE] =3D "L3 Cache", [SMCA_LS ... SMCA_LS_V2] =3D "Load Store Unit", [SMCA_MP5] =3D "Microprocessor 5 Unit", + [SMCA_MPART] =3D "MPART Unit", + [SMCA_MPASP ... SMCA_MPASP_V2] =3D "MPASP Unit", + [SMCA_MPDACC] =3D "MPDACC Unit", [SMCA_MPDMA] =3D "MPDMA Unit", + [SMCA_MPM] =3D "MPM Unit", + [SMCA_MPRAS] =3D "MPRAS Unit", [SMCA_NBIF] =3D "NBIF Unit", [SMCA_NBIO] =3D "Northbridge IO Unit", [SMCA_PB] =3D "Parameter Block", [SMCA_PCIE ... SMCA_PCIE_V2] =3D "PCI Express Unit", + [SMCA_PCIE_PL] =3D "PCIe Link Unit", [SMCA_PIE] =3D "Power, Interrupts, etc.", [SMCA_PSP ... SMCA_PSP_V2] =3D "Platform Security Processor", [SMCA_RESERVED] =3D "Reserved", [SMCA_SATA] =3D "SATA Unit", [SMCA_SHUB] =3D "System Hub Unit", [SMCA_SMU ... SMCA_SMU_V2] =3D "System Management Unit", + [SMCA_SSBDCI] =3D "Die to Die Interconnect Unit", =20 /* UMC v2 is separate because both of them can exist in a single system. = */ [SMCA_UMC] =3D "Unified Memory Controller", --=20 2.53.0