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 v2 1/3] x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums
Date: Tue, 10 Mar 2026 08:46:49 -0400 [thread overview]
Message-ID: <20260310124649.GA890303@yaz-khff2.amd.com> (raw)
In-Reply-To: <20260308102046.GNaa1NfuoXza1-cB8z@fat_crate.local>
On Sun, Mar 08, 2026 at 11:20:46AM +0100, Borislav Petkov wrote:
> On Sat, Mar 07, 2026 at 11:33:14AM -0500, Yazen Ghannam wrote:
> > +/* Order by HWID then McaType with newline between HWID groups. */
>
> So I would argue that keeping them *all* sorted the same makes reading and
> touching that code the simplest. Because you will have to modify the same
> spots when you add new ones and the hwid number doesn't really matter for
> humans.
>
> IOW, this:
>
> /*
> * Format:
> * { bank_type, hwid_mcatype }
> *
> * alphanumerically sorted by bank type.
> */
> static const struct smca_hwid smca_hwid_mcatypes[] = {
> { SMCA_CS, HWID_MCATYPE(0x2E, 0x0) },
> { SMCA_CS_V2, HWID_MCATYPE(0x2E, 0x2) },
> { SMCA_DE, HWID_MCATYPE(0xB0, 0x3) },
> { SMCA_EX, HWID_MCATYPE(0xB0, 0x5) },
> { SMCA_FP, HWID_MCATYPE(0xB0, 0x6) },
> { SMCA_GMI_PCS, HWID_MCATYPE(0x241, 0x0) },
> { SMCA_GMI_PHY, HWID_MCATYPE(0x269, 0x0) },
> { SMCA_IF, HWID_MCATYPE(0xB0, 0x1) },
> { SMCA_L2_CACHE, HWID_MCATYPE(0xB0, 0x2) },
> { SMCA_L3_CACHE, HWID_MCATYPE(0xB0, 0x7) },
> { SMCA_LS, HWID_MCATYPE(0xB0, 0x0) },
> { SMCA_LS_V2, HWID_MCATYPE(0xB0, 0x10) },
> { SMCA_MA_LLC, HWID_MCATYPE(0x2E, 0x4) },
> { SMCA_MP5, HWID_MCATYPE(0x01, 0x2) },
> { SMCA_MPDMA, HWID_MCATYPE(0x01, 0x3) },
> { SMCA_NBIF, HWID_MCATYPE(0x6C, 0x0) },
> { SMCA_NBIO, HWID_MCATYPE(0x18, 0x0) },
> { SMCA_PB, HWID_MCATYPE(0x05, 0x0) },
> { SMCA_PCIE, HWID_MCATYPE(0x46, 0x0) },
> { SMCA_PCIE_V2, HWID_MCATYPE(0x46, 0x1) },
> { SMCA_PIE, HWID_MCATYPE(0x2E, 0x1) },
> { SMCA_PSP, HWID_MCATYPE(0xFF, 0x0) },
> { SMCA_PSP_V2, HWID_MCATYPE(0xFF, 0x1) },
> { SMCA_RESERVED, HWID_MCATYPE(0x00, 0x0) },
> { SMCA_SATA, HWID_MCATYPE(0xA8, 0x0) },
> { SMCA_SHUB, HWID_MCATYPE(0x80, 0x0) },
> { SMCA_SMU, HWID_MCATYPE(0x01, 0x0) },
> { SMCA_SMU_V2, HWID_MCATYPE(0x01, 0x1) },
> { SMCA_UMC, HWID_MCATYPE(0x96, 0x0) },
> { SMCA_UMC_V2, HWID_MCATYPE(0x96, 0x1) },
> { SMCA_USB, HWID_MCATYPE(0xAA, 0x0) },
> { SMCA_USR_CP, HWID_MCATYPE(0x180, 0x0) },
> { SMCA_USR_DP, HWID_MCATYPE(0x170, 0x0) },
> { SMCA_WAFL_PHY, HWID_MCATYPE(0x267, 0x0) },
> { SMCA_XGMI_PCS, HWID_MCATYPE(0x50, 0x0) },
> { SMCA_XGMI_PHY, HWID_MCATYPE(0x259, 0x0) },
> };
>
Yeah, I see your point. This didn't sit right with me at first, but it
feels better after looking at it longer.
Want me to send another revision?
Thanks,
Yazen
next prev parent reply other threads:[~2026-03-10 12:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-07 16:33 [PATCH v2 0/3] New SMCA bank types Yazen Ghannam
2026-03-07 16:33 ` [PATCH v2 1/3] x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums Yazen Ghannam
2026-03-08 10:20 ` Borislav Petkov
2026-03-10 12:46 ` Yazen Ghannam [this message]
2026-03-11 12:41 ` Borislav Petkov
2026-03-07 16:33 ` [PATCH v2 2/3] x86/mce, EDAC/mce_amd: Update CS bank type naming Yazen Ghannam
2026-03-07 16:33 ` [PATCH v2 3/3] x86/mce, EDAC/mce_amd: Add new SMCA bank types Yazen Ghannam
2026-03-11 13:19 ` [PATCH v2 0/3] New " Borislav Petkov
2026-03-11 18:57 ` Yazen Ghannam
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=20260310124649.GA890303@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