public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
@ 2026-02-02 17:21 Yazen Ghannam
  2026-02-28 15:04 ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Yazen Ghannam @ 2026-02-02 17:21 UTC (permalink / raw)
  To: linux-edac; +Cc: linux-kernel, tony.luck, x86, Yazen Ghannam

Recognize new SMCA bank types and include their short names for sysfs
and long names for decoding.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 arch/x86/include/asm/mce.h    | 11 +++++++++++
 arch/x86/kernel/cpu/mce/amd.c | 21 +++++++++++++++++++++
 drivers/edac/mce_amd.c        | 10 ++++++++++
 3 files changed, 42 insertions(+)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 2d98886de09a..6e1f10ca053f 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -370,13 +370,24 @@ enum smca_bank_types {
 	SMCA_NBIO,	/* Northbridge IO Unit */
 	SMCA_PCIE,	/* PCI Express Unit */
 	SMCA_PCIE_V2,
+	SMCA_MPRAS,	/* MP for RAS */
 	SMCA_XGMI_PCS,	/* xGMI PCS Unit */
+	SMCA_SSBDCI,	/* Die to Die Interconnect */
 	SMCA_NBIF,	/* NBIF Unit */
 	SMCA_SHUB,	/* System HUB Unit */
 	SMCA_SATA,	/* SATA Unit */
 	SMCA_USB,	/* USB Unit */
+	SMCA_MPDACC,	/* MP for Data Acceleration */
+	SMCA_MPM,	/* Microprocessor Manageability Core */
+	SMCA_MPASP,	/* AMD Secure Processor */
+	SMCA_MPASP_V2,
+	SMCA_MPART,	/* AMD Root of Trust Microprocessor */
+	SMCA_DACC_FE,	/* Data Acceleration Front-end */
+	SMCA_DACC_BE,	/* Data Acceleration Back-end */
 	SMCA_USR_DP,	/* Ultra Short Reach Data Plane Controller */
 	SMCA_USR_CP,	/* Ultra Short Reach Control Plane Controller */
+	SMCA_EDDR5CMN,	/* eDDR5 CMN */
+	SMCA_PCIE_PL,	/* PCIe Link */
 	SMCA_GMI_PCS,	/* GMI PCS Unit */
 	SMCA_XGMI_PHY,	/* xGMI PHY Unit */
 	SMCA_WAFL_PHY,	/* WAFL PHY Unit */
diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 3f1dda355307..662d86a6bda4 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -117,13 +117,23 @@ static const char * const smca_names[] = {
 	[SMCA_MPDMA]			= "mpdma",
 	[SMCA_NBIO]			= "nbio",
 	[SMCA_PCIE ... SMCA_PCIE_V2]	= "pcie",
+	[SMCA_MPRAS]			= "mpras",
 	[SMCA_XGMI_PCS]			= "xgmi_pcs",
+	[SMCA_SSBDCI]			= "ssbdci",
 	[SMCA_NBIF]			= "nbif",
 	[SMCA_SHUB]			= "shub",
 	[SMCA_SATA]			= "sata",
 	[SMCA_USB]			= "usb",
+	[SMCA_MPDACC]			= "mpdacc",
+	[SMCA_MPM]			= "mpm",
+	[SMCA_MPASP ... SMCA_MPASP_V2]	= "mpasp",
+	[SMCA_MPART]			= "mpart",
+	[SMCA_DACC_FE]			= "dacc_fe",
+	[SMCA_DACC_BE]			= "dacc_be",
 	[SMCA_USR_DP]			= "usr_dp",
 	[SMCA_USR_CP]			= "usr_cp",
+	[SMCA_EDDR5CMN]			= "eddr5_cmn",
+	[SMCA_PCIE_PL]			= "pcie_pl",
 	[SMCA_GMI_PCS]			= "gmi_pcs",
 	[SMCA_XGMI_PHY]			= "xgmi_phy",
 	[SMCA_WAFL_PHY]			= "wafl_phy",
@@ -204,13 +214,24 @@ static const struct smca_hwid smca_hwid_mcatypes[] = {
 	{ SMCA_PCIE,	 HWID_MCATYPE(0x46, 0x0)	},
 	{ SMCA_PCIE_V2,	 HWID_MCATYPE(0x46, 0x1)	},
 
+	{ SMCA_MPRAS,	 HWID_MCATYPE(0x12, 0x0)	},
 	{ SMCA_XGMI_PCS, HWID_MCATYPE(0x50, 0x0)	},
+	{ SMCA_SSBDCI,	 HWID_MCATYPE(0x5C, 0x0)	},
 	{ SMCA_NBIF,	 HWID_MCATYPE(0x6C, 0x0)	},
 	{ SMCA_SHUB,	 HWID_MCATYPE(0x80, 0x0)	},
 	{ SMCA_SATA,	 HWID_MCATYPE(0xA8, 0x0)	},
 	{ SMCA_USB,	 HWID_MCATYPE(0xAA, 0x0)	},
+	{ 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_MPART,	 HWID_MCATYPE(0xFF, 0x2)	},
+	{ SMCA_DACC_FE,	 HWID_MCATYPE(0x157, 0x0)	},
+	{ SMCA_DACC_BE,	 HWID_MCATYPE(0x164, 0x0)	},
 	{ SMCA_USR_DP,	 HWID_MCATYPE(0x170, 0x0)	},
 	{ SMCA_USR_CP,	 HWID_MCATYPE(0x180, 0x0)	},
+	{ SMCA_EDDR5CMN, HWID_MCATYPE(0x1E0, 0x0)	},
+	{ SMCA_PCIE_PL,	 HWID_MCATYPE(0x1E1, 0x0)	},
 	{ SMCA_GMI_PCS,  HWID_MCATYPE(0x241, 0x0)	},
 	{ SMCA_XGMI_PHY, HWID_MCATYPE(0x259, 0x0)	},
 	{ SMCA_WAFL_PHY, HWID_MCATYPE(0x267, 0x0)	},
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index af3c12284a1e..43051aab72ba 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -710,11 +710,21 @@ static const char * const smca_long_names[] = {
 	[SMCA_MPDMA]			= "MPDMA Unit",
 	[SMCA_NBIO]			= "Northbridge IO Unit",
 	[SMCA_PCIE ... SMCA_PCIE_V2]	= "PCI Express Unit",
+	[SMCA_MPRAS]			= "MPRAS Unit",
 	[SMCA_XGMI_PCS]			= "Ext Global Memory Interconnect PCS Unit",
+	[SMCA_SSBDCI]			= "Die to Die Interconnect Unit",
 	[SMCA_NBIF]			= "NBIF Unit",
 	[SMCA_SHUB]			= "System Hub Unit",
 	[SMCA_SATA]			= "SATA Unit",
 	[SMCA_USB]			= "USB Unit",
+	[SMCA_MPDACC]			= "MPDACC Unit",
+	[SMCA_MPM]			= "MPM Unit",
+	[SMCA_MPASP ... SMCA_MPASP_V2]	= "MPASP Unit",
+	[SMCA_MPART]			= "MPART Unit",
+	[SMCA_DACC_FE]			= "DACC Front-end Unit",
+	[SMCA_DACC_BE]			= "DACC Back-end Unit",
+	[SMCA_EDDR5CMN]			= "eDDR5 CMN Unit",
+	[SMCA_PCIE_PL]			= "PCIe Link Unit",
 	[SMCA_GMI_PCS]			= "Global Memory Interconnect PCS Unit",
 	[SMCA_XGMI_PHY]			= "Ext Global Memory Interconnect PHY Unit",
 	[SMCA_WAFL_PHY]			= "WAFL PHY Unit",
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-02-02 17:21 [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types Yazen Ghannam
@ 2026-02-28 15:04 ` Borislav Petkov
  2026-03-02 14:22   ` Yazen Ghannam
  0 siblings, 1 reply; 8+ messages in thread
From: Borislav Petkov @ 2026-02-28 15:04 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Mon, Feb 02, 2026 at 05:21:58PM +0000, Yazen Ghannam wrote:
> Recognize new SMCA bank types and include their short names for sysfs
> and long names for decoding.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  arch/x86/include/asm/mce.h    | 11 +++++++++++
>  arch/x86/kernel/cpu/mce/amd.c | 21 +++++++++++++++++++++
>  drivers/edac/mce_amd.c        | 10 ++++++++++
>  3 files changed, 42 insertions(+)
> 
> diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> index 2d98886de09a..6e1f10ca053f 100644
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -370,13 +370,24 @@ enum smca_bank_types {
>  	SMCA_NBIO,	/* Northbridge IO Unit */
>  	SMCA_PCIE,	/* PCI Express Unit */
>  	SMCA_PCIE_V2,
> +	SMCA_MPRAS,	/* MP for RAS */
>  	SMCA_XGMI_PCS,	/* xGMI PCS Unit */
> +	SMCA_SSBDCI,	/* Die to Die Interconnect */
>  	SMCA_NBIF,	/* NBIF Unit */
>  	SMCA_SHUB,	/* System HUB Unit */
>  	SMCA_SATA,	/* SATA Unit */
>  	SMCA_USB,	/* USB Unit */
> +	SMCA_MPDACC,	/* MP for Data Acceleration */
> +	SMCA_MPM,	/* Microprocessor Manageability Core */
> +	SMCA_MPASP,	/* AMD Secure Processor */
> +	SMCA_MPASP_V2,
> +	SMCA_MPART,	/* AMD Root of Trust Microprocessor */
> +	SMCA_DACC_FE,	/* Data Acceleration Front-end */
> +	SMCA_DACC_BE,	/* Data Acceleration Back-end */
>  	SMCA_USR_DP,	/* Ultra Short Reach Data Plane Controller */
>  	SMCA_USR_CP,	/* Ultra Short Reach Control Plane Controller */
> +	SMCA_EDDR5CMN,	/* eDDR5 CMN */
> +	SMCA_PCIE_PL,	/* PCIe Link */
>  	SMCA_GMI_PCS,	/* GMI PCS Unit */
>  	SMCA_XGMI_PHY,	/* xGMI PHY Unit */
>  	SMCA_WAFL_PHY,	/* WAFL PHY Unit */

That ordering looks rather random. Does it matter which enum number a bank
type is? If not, let's sort them alphabetically for easier reading...

In the remaining places too.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-02-28 15:04 ` Borislav Petkov
@ 2026-03-02 14:22   ` Yazen Ghannam
  2026-03-03 15:38     ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Yazen Ghannam @ 2026-03-02 14:22 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Sat, Feb 28, 2026 at 04:04:47PM +0100, Borislav Petkov wrote:
> On Mon, Feb 02, 2026 at 05:21:58PM +0000, Yazen Ghannam wrote:
> > Recognize new SMCA bank types and include their short names for sysfs
> > and long names for decoding.
> > 
> > Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> > ---
> >  arch/x86/include/asm/mce.h    | 11 +++++++++++
> >  arch/x86/kernel/cpu/mce/amd.c | 21 +++++++++++++++++++++
> >  drivers/edac/mce_amd.c        | 10 ++++++++++
> >  3 files changed, 42 insertions(+)
> > 
> > diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> > index 2d98886de09a..6e1f10ca053f 100644
> > --- a/arch/x86/include/asm/mce.h
> > +++ b/arch/x86/include/asm/mce.h
> > @@ -370,13 +370,24 @@ enum smca_bank_types {
> >  	SMCA_NBIO,	/* Northbridge IO Unit */
> >  	SMCA_PCIE,	/* PCI Express Unit */
> >  	SMCA_PCIE_V2,
> > +	SMCA_MPRAS,	/* MP for RAS */
> >  	SMCA_XGMI_PCS,	/* xGMI PCS Unit */
> > +	SMCA_SSBDCI,	/* Die to Die Interconnect */
> >  	SMCA_NBIF,	/* NBIF Unit */
> >  	SMCA_SHUB,	/* System HUB Unit */
> >  	SMCA_SATA,	/* SATA Unit */
> >  	SMCA_USB,	/* USB Unit */
> > +	SMCA_MPDACC,	/* MP for Data Acceleration */
> > +	SMCA_MPM,	/* Microprocessor Manageability Core */
> > +	SMCA_MPASP,	/* AMD Secure Processor */
> > +	SMCA_MPASP_V2,
> > +	SMCA_MPART,	/* AMD Root of Trust Microprocessor */
> > +	SMCA_DACC_FE,	/* Data Acceleration Front-end */
> > +	SMCA_DACC_BE,	/* Data Acceleration Back-end */
> >  	SMCA_USR_DP,	/* Ultra Short Reach Data Plane Controller */
> >  	SMCA_USR_CP,	/* Ultra Short Reach Control Plane Controller */
> > +	SMCA_EDDR5CMN,	/* eDDR5 CMN */
> > +	SMCA_PCIE_PL,	/* PCIe Link */
> >  	SMCA_GMI_PCS,	/* GMI PCS Unit */
> >  	SMCA_XGMI_PHY,	/* xGMI PHY Unit */
> >  	SMCA_WAFL_PHY,	/* WAFL PHY Unit */
> 
> That ordering looks rather random. Does it matter which enum number a bank
> type is? If not, let's sort them alphabetically for easier reading...
> 
> In the remaining places too.
> 

The ordering is based on the HWID_MCATYPE() tuple. The intent is to keep
those in numerical order for easy reference with documentation.

See: smca_hwid_mcatypes[]

Thanks,
Yazen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-03-02 14:22   ` Yazen Ghannam
@ 2026-03-03 15:38     ` Borislav Petkov
  2026-03-04 15:04       ` Yazen Ghannam
  0 siblings, 1 reply; 8+ messages in thread
From: Borislav Petkov @ 2026-03-03 15:38 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Mon, Mar 02, 2026 at 09:22:55AM -0500, Yazen Ghannam wrote:
> The ordering is based on the HWID_MCATYPE() tuple. The intent is to keep
> those in numerical order for easy reference with documentation.
> 
> See: smca_hwid_mcatypes[]

Ok, what is determining *this* particular order?

First LS, then LS_V2, then IF, then L2_CACHE, then EX... all those start with
0xb0.

Then CS, PIE, etc start with 0x2e...

I guess I don't see yet what the sorting criterion here is...

Thx.

static const struct smca_hwid smca_hwid_mcatypes[] = {



 { SMCA_RESERVED, (((0x00) << 16) | (0x0)) },


 { SMCA_LS, (((0xB0) << 16) | (0x0)) },
 { SMCA_LS_V2, (((0xB0) << 16) | (0x10)) },
 { SMCA_IF, (((0xB0) << 16) | (0x1)) },
 { SMCA_L2_CACHE, (((0xB0) << 16) | (0x2)) },
 { SMCA_DE, (((0xB0) << 16) | (0x3)) },

 { SMCA_EX, (((0xB0) << 16) | (0x5)) },
 { SMCA_FP, (((0xB0) << 16) | (0x6)) },
 { SMCA_L3_CACHE, (((0xB0) << 16) | (0x7)) },


 { SMCA_CS, (((0x2E) << 16) | (0x0)) },
 { SMCA_PIE, (((0x2E) << 16) | (0x1)) },
 { SMCA_CS_V2, (((0x2E) << 16) | (0x2)) },
 { SMCA_MA_LLC, (((0x2E) << 16) | (0x4)) },


 { SMCA_UMC, (((0x96) << 16) | (0x0)) },
 { SMCA_UMC_V2, (((0x96) << 16) | (0x1)) },


 { SMCA_PB, (((0x05) << 16) | (0x0)) },


 { SMCA_PSP, (((0xFF) << 16) | (0x0)) },
 { SMCA_PSP_V2, (((0xFF) << 16) | (0x1)) },


 { SMCA_SMU, (((0x01) << 16) | (0x0)) },
 { SMCA_SMU_V2, (((0x01) << 16) | (0x1)) },


 { SMCA_MP5, (((0x01) << 16) | (0x2)) },


 { SMCA_MPDMA, (((0x01) << 16) | (0x3)) },


 { SMCA_NBIO, (((0x18) << 16) | (0x0)) },


 { SMCA_PCIE, (((0x46) << 16) | (0x0)) },
 { SMCA_PCIE_V2, (((0x46) << 16) | (0x1)) },

 { SMCA_XGMI_PCS, (((0x50) << 16) | (0x0)) },
 { SMCA_NBIF, (((0x6C) << 16) | (0x0)) },
 { SMCA_SHUB, (((0x80) << 16) | (0x0)) },
 { SMCA_SATA, (((0xA8) << 16) | (0x0)) },
 { SMCA_USB, (((0xAA) << 16) | (0x0)) },
 { SMCA_USR_DP, (((0x170) << 16) | (0x0)) },
 { SMCA_USR_CP, (((0x180) << 16) | (0x0)) },
 { SMCA_GMI_PCS, (((0x241) << 16) | (0x0)) },
 { SMCA_XGMI_PHY, (((0x259) << 16) | (0x0)) },
 { SMCA_WAFL_PHY, (((0x267) << 16) | (0x0)) },
 { SMCA_GMI_PHY, (((0x269) << 16) | (0x0)) },
};

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-03-03 15:38     ` Borislav Petkov
@ 2026-03-04 15:04       ` Yazen Ghannam
  2026-03-04 16:39         ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Yazen Ghannam @ 2026-03-04 15:04 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Tue, Mar 03, 2026 at 04:38:14PM +0100, Borislav Petkov wrote:
> On Mon, Mar 02, 2026 at 09:22:55AM -0500, Yazen Ghannam wrote:
> > The ordering is based on the HWID_MCATYPE() tuple. The intent is to keep
> > those in numerical order for easy reference with documentation.
> > 
> > See: smca_hwid_mcatypes[]
> 
> Ok, what is determining *this* particular order?
> 
> First LS, then LS_V2, then IF, then L2_CACHE, then EX... all those start with
> 0xb0.
> 
> Then CS, PIE, etc start with 0x2e...
> 
> I guess I don't see yet what the sorting criterion here is...
> 
> Thx.

Yes, you're right. IIRC, the original order was based on the first
documentation from Zen1.

Later on, we tried to keep new bank types ordered numerically, if they
didn't fit with an existing type. That's mostly the group at the end.

> 
> static const struct smca_hwid smca_hwid_mcatypes[] = {
> 
> 
> 
>  { SMCA_RESERVED, (((0x00) << 16) | (0x0)) },
> 
> 
>  { SMCA_LS, (((0xB0) << 16) | (0x0)) },
>  { SMCA_LS_V2, (((0xB0) << 16) | (0x10)) },
>  { SMCA_IF, (((0xB0) << 16) | (0x1)) },
>  { SMCA_L2_CACHE, (((0xB0) << 16) | (0x2)) },
>  { SMCA_DE, (((0xB0) << 16) | (0x3)) },
> 
>  { SMCA_EX, (((0xB0) << 16) | (0x5)) },
>  { SMCA_FP, (((0xB0) << 16) | (0x6)) },
>  { SMCA_L3_CACHE, (((0xB0) << 16) | (0x7)) },
> 
> 
>  { SMCA_CS, (((0x2E) << 16) | (0x0)) },
>  { SMCA_PIE, (((0x2E) << 16) | (0x1)) },
>  { SMCA_CS_V2, (((0x2E) << 16) | (0x2)) },
>  { SMCA_MA_LLC, (((0x2E) << 16) | (0x4)) },
> 
> 
>  { SMCA_UMC, (((0x96) << 16) | (0x0)) },
>  { SMCA_UMC_V2, (((0x96) << 16) | (0x1)) },
> 
> 
>  { SMCA_PB, (((0x05) << 16) | (0x0)) },
> 
> 
>  { SMCA_PSP, (((0xFF) << 16) | (0x0)) },
>  { SMCA_PSP_V2, (((0xFF) << 16) | (0x1)) },
> 
> 
>  { SMCA_SMU, (((0x01) << 16) | (0x0)) },
>  { SMCA_SMU_V2, (((0x01) << 16) | (0x1)) },
> 
> 
>  { SMCA_MP5, (((0x01) << 16) | (0x2)) },
> 
> 
>  { SMCA_MPDMA, (((0x01) << 16) | (0x3)) },
> 
> 
>  { SMCA_NBIO, (((0x18) << 16) | (0x0)) },
> 
> 
>  { SMCA_PCIE, (((0x46) << 16) | (0x0)) },
>  { SMCA_PCIE_V2, (((0x46) << 16) | (0x1)) },
> 
>  { SMCA_XGMI_PCS, (((0x50) << 16) | (0x0)) },
>  { SMCA_NBIF, (((0x6C) << 16) | (0x0)) },
>  { SMCA_SHUB, (((0x80) << 16) | (0x0)) },
>  { SMCA_SATA, (((0xA8) << 16) | (0x0)) },
>  { SMCA_USB, (((0xAA) << 16) | (0x0)) },
>  { SMCA_USR_DP, (((0x170) << 16) | (0x0)) },
>  { SMCA_USR_CP, (((0x180) << 16) | (0x0)) },
>  { SMCA_GMI_PCS, (((0x241) << 16) | (0x0)) },
>  { SMCA_XGMI_PHY, (((0x259) << 16) | (0x0)) },
>  { SMCA_WAFL_PHY, (((0x267) << 16) | (0x0)) },
>  { SMCA_GMI_PHY, (((0x269) << 16) | (0x0)) },
> };
> 

We can re-sort them. Still want to have them alphabetically?

I can re-sort in a pre-patch before adding the new ones.

Thanks,
Yazen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-03-04 15:04       ` Yazen Ghannam
@ 2026-03-04 16:39         ` Borislav Petkov
  2026-03-04 18:02           ` Yazen Ghannam
  0 siblings, 1 reply; 8+ messages in thread
From: Borislav Petkov @ 2026-03-04 16:39 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Wed, Mar 04, 2026 at 10:04:02AM -0500, Yazen Ghannam wrote:
> We can re-sort them. Still want to have them alphabetically?

I'm not sure how yet - all I'm trying to say is that random order is kinda
suboptimal when having to look at the code.

Alphabetically probably sounds ok because you have 0xb0 ones, for example,
which belong to different banks which makes me think that the hwid in
HWID_MCATYPE(hwid, mcatype) is perhaps arbitrary and not very important. 

And perhaps we can work better with alphabetically sorted IP names...

Rite?

> I can re-sort in a pre-patch before adding the new ones.

Yeah, makes sense.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-03-04 16:39         ` Borislav Petkov
@ 2026-03-04 18:02           ` Yazen Ghannam
  2026-03-04 20:24             ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Yazen Ghannam @ 2026-03-04 18:02 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Wed, Mar 04, 2026 at 05:39:53PM +0100, Borislav Petkov wrote:
> On Wed, Mar 04, 2026 at 10:04:02AM -0500, Yazen Ghannam wrote:
> > We can re-sort them. Still want to have them alphabetically?
> 
> I'm not sure how yet - all I'm trying to say is that random order is kinda
> suboptimal when having to look at the code.
> 
> Alphabetically probably sounds ok because you have 0xb0 ones, for example,
> which belong to different banks which makes me think that the hwid in
> HWID_MCATYPE(hwid, mcatype) is perhaps arbitrary and not very important. 

The HWID and McaType are defined in the hardware. The name/enum is
arbitrary, and we use those for convenience.

Some of the HWID represent a group of IP, e.g. 0xb0 is (so far) used for
Core banks, 0x2e for Fabric, etc.

So far we haven't needed to use HWID on its own. Though I had a patch to
check for a "memory controller" type by HWID=0x96.

https://lore.kernel.org/all/20231118193248.1296798-6-yazen.ghannam@amd.com/

Though maybe you mean "sorting based on HWID/McaType" is not important?
I agree.

> 
> And perhaps we can work better with alphabetically sorted IP names...
> 
> Rite?
> 
> > I can re-sort in a pre-patch before adding the new ones.
> 
> Yeah, makes sense.
> 

Okay, I'll work on it.

Thanks,
Yazen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
  2026-03-04 18:02           ` Yazen Ghannam
@ 2026-03-04 20:24             ` Borislav Petkov
  0 siblings, 0 replies; 8+ messages in thread
From: Borislav Petkov @ 2026-03-04 20:24 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-edac, linux-kernel, tony.luck, x86

On Wed, Mar 04, 2026 at 01:02:20PM -0500, Yazen Ghannam wrote:
> Though maybe you mean "sorting based on HWID/McaType" is not important?
> I agree.

Yeah, we can sort by IP name and not care of the numeric groups.

> Okay, I'll work on it.

Thanks!

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-04 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 17:21 [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types Yazen Ghannam
2026-02-28 15:04 ` Borislav Petkov
2026-03-02 14:22   ` Yazen Ghannam
2026-03-03 15:38     ` Borislav Petkov
2026-03-04 15:04       ` Yazen Ghannam
2026-03-04 16:39         ` Borislav Petkov
2026-03-04 18:02           ` Yazen Ghannam
2026-03-04 20:24             ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox