* [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
@ 2026-10-09 2:04 Guixiong Wei
2026-10-09 5:07 ` Borislav Petkov
2026-10-12 14:03 ` Yazen Ghannam
0 siblings, 2 replies; 9+ messages in thread
From: Guixiong Wei @ 2026-10-09 2:04 UTC (permalink / raw)
To: Yazen Ghannam
Cc: Guixiong Wei, Borislav Petkov, Tony Luck, Muralidhara M K,
linux-edac, linux-kernel, stable
Commit 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP,
and USR_CP bank types") added three SMCA bank types after the bank long
names had been moved to the MCE decoder.
The new types were added to the enum, short-name table, and HWID/McaType
mapping, but not to smca_long_names[]. As a result, an error from any of
these banks is logged with "(null)" in place of the bank name.
Add the missing long names.
Fixes: 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types")
Cc: stable@vger.kernel.org
Signed-off-by: Guixiong Wei <weiguixiong@bytedance.com>
---
drivers/edac/mce_amd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 7aee57a25b689..34a44769d1d0f 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -702,6 +702,7 @@ static const char * const smca_long_names[] = {
[SMCA_L2_CACHE] = "L2 Cache",
[SMCA_L3_CACHE] = "L3 Cache",
[SMCA_LS ... SMCA_LS_V2] = "Load Store Unit",
+ [SMCA_MA_LLC] = "Memory Attached Last Level Cache",
[SMCA_MP5] = "Microprocessor 5 Unit",
[SMCA_MPART] = "MPART Unit",
[SMCA_MPASP ... SMCA_MPASP_V2] = "MPASP Unit",
@@ -726,6 +727,8 @@ static const char * const smca_long_names[] = {
[SMCA_UMC] = "Unified Memory Controller",
[SMCA_UMC_V2] = "Unified Memory Controller v2",
[SMCA_USB] = "USB Unit",
+ [SMCA_USR_CP] = "Ultra Short Reach Control Plane Controller",
+ [SMCA_USR_DP] = "Ultra Short Reach Data Plane Controller",
[SMCA_WAFL_PHY] = "WAFL PHY Unit",
[SMCA_XGMI_PCS] = "Ext Global Memory Interconnect PCS Unit",
[SMCA_XGMI_PHY] = "Ext Global Memory Interconnect PHY Unit",
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-09 2:04 [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types Guixiong Wei
@ 2026-10-09 5:07 ` Borislav Petkov
2026-10-12 14:03 ` Yazen Ghannam
1 sibling, 0 replies; 9+ messages in thread
From: Borislav Petkov @ 2026-10-09 5:07 UTC (permalink / raw)
To: Guixiong Wei
Cc: Yazen Ghannam, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Fri, Oct 09, 2026 at 10:04:24AM +0800, Guixiong Wei wrote:
> Commit 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP,
> and USR_CP bank types") added three SMCA bank types after the bank long
> names had been moved to the MCE decoder.
>
> The new types were added to the enum, short-name table, and HWID/McaType
> mapping, but not to smca_long_names[]. As a result, an error from any of
> these banks is logged with "(null)" in place of the bank name.
>
> Add the missing long names.
>
> Fixes: 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types")
> Cc: stable@vger.kernel.org
Which of the real-bug-fix criteria at the top of that file:
Documentation/process/stable-kernel-rules.rst
justify the CC:stable tag?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-09 2:04 [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types Guixiong Wei
2026-10-09 5:07 ` Borislav Petkov
@ 2026-10-12 14:03 ` Yazen Ghannam
2026-10-17 19:51 ` Borislav Petkov
1 sibling, 1 reply; 9+ messages in thread
From: Yazen Ghannam @ 2026-10-12 14:03 UTC (permalink / raw)
To: Guixiong Wei
Cc: Borislav Petkov, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Fri, Oct 09, 2026 at 10:04:24AM +0800, Guixiong Wei wrote:
> Commit 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP,
> and USR_CP bank types") added three SMCA bank types after the bank long
> names had been moved to the MCE decoder.
>
> The new types were added to the enum, short-name table, and HWID/McaType
> mapping, but not to smca_long_names[]. As a result, an error from any of
> these banks is logged with "(null)" in place of the bank name.
>
> Add the missing long names.
>
> Fixes: 47b744ea5e3c ("x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guixiong Wei <weiguixiong@bytedance.com>
These were intentionaly left out as it as it seems users have been
moving to user space decode tools.
Do you actually need these in the kernel?
Thanks,
Yazen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-12 14:03 ` Yazen Ghannam
@ 2026-10-17 19:51 ` Borislav Petkov
2026-10-18 22:34 ` Yazen Ghannam
0 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2026-10-17 19:51 UTC (permalink / raw)
To: Yazen Ghannam
Cc: Guixiong Wei, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Mon, Oct 12, 2026 at 10:03:30AM -0400, Yazen Ghannam wrote:
> These were intentionaly left out as it as it seems users have been
> moving to user space decode tools.
You're making the old mistake:
a. a naked MCE record in dmesg, you have to open the PPRs and actually decode
it by hand. Or use a tool but most of the time, that tool is not updated with
the latest error definitions, and you need the exact machine info in order for
the tool to decode properly, yadda yadda...
b. Get a fully decoded error string in dmesg.
What is better: a) or b) ?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-17 19:51 ` Borislav Petkov
@ 2026-10-18 22:34 ` Yazen Ghannam
2026-10-18 23:07 ` Borislav Petkov
2026-10-19 2:16 ` Guixiong Wei
0 siblings, 2 replies; 9+ messages in thread
From: Yazen Ghannam @ 2026-10-18 22:34 UTC (permalink / raw)
To: Borislav Petkov
Cc: Guixiong Wei, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Sat, Oct 17, 2026 at 12:51:45PM -0700, Borislav Petkov wrote:
> On Mon, Oct 12, 2026 at 10:03:30AM -0400, Yazen Ghannam wrote:
> > These were intentionaly left out as it as it seems users have been
> > moving to user space decode tools.
>
> You're making the old mistake:
>
> a. a naked MCE record in dmesg, you have to open the PPRs and actually decode
> it by hand. Or use a tool but most of the time, that tool is not updated with
> the latest error definitions, and you need the exact machine info in order for
> the tool to decode properly, yadda yadda...
>
> b. Get a fully decoded error string in dmesg.
>
> What is better: a) or b) ?
>
"a" is better.
The same "is not updated with the latest error definitions" applies to
the kernel.
And it's usually easier to update tools than patch the kernel (and also
deal with backporting, etc.).
In any case, this patch isn't about error descriptions. It's only about
adding the names for some bank types.
The bank types were added three years ago. AFAIK, the missing names
haven't been an issue. So I'm curious if this patch is actually fixing a
problem. If so, then that's fine.
Thanks,
Yazen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-18 22:34 ` Yazen Ghannam
@ 2026-10-18 23:07 ` Borislav Petkov
2026-10-19 2:16 ` Guixiong Wei
1 sibling, 0 replies; 9+ messages in thread
From: Borislav Petkov @ 2026-10-18 23:07 UTC (permalink / raw)
To: Yazen Ghannam
Cc: Guixiong Wei, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Sun, Oct 18, 2026 at 06:34:31PM -0400, Yazen Ghannam wrote:
> "a" is better.
Nope.
Typing raw error values from a screen because the machine died and there's no
serial, or making a screen cap and then OCRing it and then finding another
machine to decode it on after checking the OCR did read the hex values
properly and yadda yadda...
vs
simply reading the properly decoded error decode from the screen is not
better, no matter from where you look at it.
> The same "is not updated with the latest error definitions" applies to
> the kernel.
You probably mean distro kernels. Because we try to have those updates
mainline as fast as possible.
> And it's usually easier to update tools than patch the kernel (and also
> deal with backporting, etc.).
Yah, backporting kernels has a lag in it but if the decoding updates are
upstream, distros do tend to pick them up.
> In any case, this patch isn't about error descriptions. It's only about
> adding the names for some bank types.
>
> The bank types were added three years ago. AFAIK, the missing names
> haven't been an issue. So I'm curious if this patch is actually fixing a
> problem. If so, then that's fine.
We dump the smca_long_names:
pr_emerg(HW_ERR "%s Ext. Error Code: %d", smca_get_long_name(bank_type), xec);
On that patch I objected to the Cc: <stable@kernel.org> marker but if distro
kernels are the problem wrt decoding MCEs, we can change that and simply route
all *purely* decoding patches to stable.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-18 22:34 ` Yazen Ghannam
2026-10-18 23:07 ` Borislav Petkov
@ 2026-10-19 2:16 ` Guixiong Wei
2026-10-19 4:19 ` Borislav Petkov
1 sibling, 1 reply; 9+ messages in thread
From: Guixiong Wei @ 2026-10-19 2:16 UTC (permalink / raw)
To: Yazen Ghannam
Cc: Borislav Petkov, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable, Guixiong Wei
> From: "Yazen Ghannam"<yazen.ghannam@amd.com>
> Date: Mon, Oct 19, 2026, 06:35
> Subject: Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
> To: "Borislav Petkov"<bp@alien8.de>
> Cc: "Guixiong Wei"<weiguixiong@bytedance.com>, "Tony Luck"<tony.luck@intel.com>, "Muralidhara M K"<muralidhara.mk@amd.com>, <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
> On Sat, Oct 17, 2026 at 12:51:45PM -0700, Borislav Petkov wrote:
> > On Mon, Oct 12, 2026 at 10:03:30AM -0400, Yazen Ghannam wrote:
> > > These were intentionaly left out as it as it seems users have been
> > > moving to user space decode tools.
> >
> > You're making the old mistake:
> >
> > a. a naked MCE record in dmesg, you have to open the PPRs and actually decode
> > it by hand. Or use a tool but most of the time, that tool is not updated with
> > the latest error definitions, and you need the exact machine info in order for
> > the tool to decode properly, yadda yadda...
> >
> > b. Get a fully decoded error string in dmesg.
> >
> > What is better: a) or b) ?
> >
>
> "a" is better.
>
> The same "is not updated with the latest error definitions" applies to
> the kernel.
>
> And it's usually easier to update tools than patch the kernel (and also
> deal with backporting, etc.).
>
> In any case, this patch isn't about error descriptions. It's only about
> adding the names for some bank types.
>
> The bank types were added three years ago. AFAIK, the missing names
> haven't been an issue. So I'm curious if this patch is actually fixing a
> problem. If so, then that's fine.
I found this while reviewing decode_smca_error(), rather than from
an observed MCE or a user report. In particular, I was looking at:
pr_emerg(HW_ERR "%s Ext. Error Code: %d",
smca_get_long_name(bank_type), xec);
For SMCA_MA_LLC, SMCA_USR_DP and SMCA_USR_CP, the corresponding
smca_long_names[] entries are unset, so smca_get_long_name() returns
NULL. The %s conversion would therefore print "(null)" instead of
the bank name.
That was what prompted the patch. I had assumed those entries were
an oversight; the intention was to make the existing log output
show the bank names.
Regarding Boris's earlier comment, I agree that the Cc: stable tag
was not justified here and will drop it.
Thanks for the feedback.
Guixiong
>
> Thanks,
> Yazen
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-19 2:16 ` Guixiong Wei
@ 2026-10-19 4:19 ` Borislav Petkov
2026-10-19 13:05 ` Yazen Ghannam
0 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2026-10-19 4:19 UTC (permalink / raw)
To: Guixiong Wei
Cc: Yazen Ghannam, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Mon, Oct 19, 2026 at 10:16:32AM +0800, Guixiong Wei wrote:
> Regarding Boris's earlier comment, I agree that the Cc: stable tag
> was not justified here and will drop it.
You don't have to resend - I'll fix it up.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types
2026-10-19 4:19 ` Borislav Petkov
@ 2026-10-19 13:05 ` Yazen Ghannam
0 siblings, 0 replies; 9+ messages in thread
From: Yazen Ghannam @ 2026-10-19 13:05 UTC (permalink / raw)
To: Borislav Petkov
Cc: Guixiong Wei, Tony Luck, Muralidhara M K, linux-edac,
linux-kernel, stable
On Sun, Oct 18, 2026 at 09:19:09PM -0700, Borislav Petkov wrote:
> On Mon, Oct 19, 2026 at 10:16:32AM +0800, Guixiong Wei wrote:
> > Regarding Boris's earlier comment, I agree that the Cc: stable tag
> > was not justified here and will drop it.
>
> You don't have to resend - I'll fix it up.
>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Thanks,
Yazen
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-19 13:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 2:04 [PATCH] EDAC/mce_amd: Add missing long names for SMCA bank types Guixiong Wei
2026-10-09 5:07 ` Borislav Petkov
2026-10-12 14:03 ` Yazen Ghannam
2026-10-17 19:51 ` Borislav Petkov
2026-10-18 22:34 ` Yazen Ghannam
2026-10-18 23:07 ` Borislav Petkov
2026-10-19 2:16 ` Guixiong Wei
2026-10-19 4:19 ` Borislav Petkov
2026-10-19 13:05 ` Yazen Ghannam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®