public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	tony.luck@intel.com, x86@kernel.org
Subject: Re: [PATCH] x86/mce/amd, EDAC/mce_amd: Add new SMCA bank types
Date: Wed, 4 Mar 2026 10:04:02 -0500	[thread overview]
Message-ID: <20260304150402.GA807247@yaz-khff2.amd.com> (raw)
In-Reply-To: <20260303153814.GAaacAZrUnFNBhPq1K@fat_crate.local>

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

  reply	other threads:[~2026-03-04 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-03-04 16:39         ` Borislav Petkov
2026-03-04 18:02           ` Yazen Ghannam
2026-03-04 20:24             ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2021-05-01 16:16 [PATCH] x86/MCE/AMD, " Muralidhara M K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260304150402.GA807247@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox