RAS/AMD/ATL: Decrease message about unknown DF revision to debug
PATCH 1/1 RAS/AMD/ATL: Decrease message about unknown DF revision to debug
commit 187d1b27a1e43 ("RAS/AMD/ATL: Require PRM support for future systems") made PRM mandatory for future systems; but this is only a datacenter centric point of view. PRM is implemented on a case by case basis on other products and thus it will be expected that the DF revision can't be detected on some systems.
Decrease the applicable messaging to debug.
--- drivers/ras/amd/atl/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ras/amd/atl/system.c +1 -1
@@ -300,7 +300,7 @@ int get_df_system_info(void) ret =determine_df_rev ();if (ret) { -pr_warn ("Failed to determine DF Revision" ); +pr_debug ("Failed to determine DF Revision" ); df_cfg.rev =UNKNOWN ;return ret; }
Signature · 1 line
2.53.0
Borislav Petkov
maintainerQuoted 19 lines · Mario Limonciello
commit
187d1b27a1e43("RAS/AMD/ATL: Require PRM support for future systems") made PRM mandatory for future systems; but this is only a datacenter centric point of view. PRM is implemented on a case by case basis on other products and thus it will be expected that the DF revision can't be detected on some systems.Decrease the applicable messaging to debug.
Fixes 187d1b27a1e43 ("RAS/AMD/ATL: Require PRM support for future systems")Signed-off-by Mario Limonciello <[email protected]>--- drivers/ras/amd/atl/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ras/amd/atl/system.c +0
-0
drivers/ras/amd/atl/system.c int get_df_system_info(void) · line 306
Quoted 8 lines
drivers/ras/amd/atl/system.c +1
-1@@ -300,7 +300,7 @@ int get_df_system_info(void) ret =determine_df_rev ();if (ret) { -pr_warn ("Failed to determine DF Revision" ); +pr_debug ("Failed to determine DF Revision" ); df_cfg.rev =UNKNOWN ;return ret; }
Well, this doesn't look like the right fix to me.
If the platform has PRM, then it shouldn't warn about not being able to determine a DF revision because it doesn't need to...
No?
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 31 lines · Borislav Petkov
Quoted 19 lines · Mario Limonciello
commit
187d1b27a1e43("RAS/AMD/ATL: Require PRM support for future systems") made PRM mandatory for future systems; but this is only a datacenter centric point of view. PRM is implemented on a case by case basis on other products and thus it will be expected that the DF revision can't be detected on some systems.Decrease the applicable messaging to debug.
Fixes 187d1b27a1e43 ("RAS/AMD/ATL: Require PRM support for future systems")Signed-off-by Mario Limonciello <[email protected]>--- drivers/ras/amd/atl/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ras/amd/atl/system.c +0
-0drivers/ras/amd/atl/system.c int get_df_system_info(void) · line 306
Quoted 8 lines
drivers/ras/amd/atl/system.c +1
-1@@ -300,7 +300,7 @@ int get_df_system_info(void) ret =determine_df_rev ();if (ret) { -pr_warn ("Failed to determine DF Revision" ); +pr_debug ("Failed to determine DF Revision" ); df_cfg.rev =UNKNOWN ;return ret; }Well, this doesn't look like the right fix to me.
Quoted 5 lines
If the platform has PRM, then it shouldn't warn about not being able to determine a DF revision because it doesn't need to...
No?
Well in this case the platform /doesn't/ have PRM. The implication is we're not going to have DF support either if the system doesn't have PRM.
We pass the error codes up so the caller of amd_atl_init() will fail init and thus the UMC decoder won't work.
That's all the intended behavior for such systems.
Borislav Petkov
maintainerQuoted 7 lines · Mario Limonciello
Well in this case the platform /doesn't/ have PRM. The implication is we're not going to have DF support either if the system doesn't have PRM.
We pass the error codes up so the caller of
amd_atl_init()will fail init and thus the UMC decoder won't work.That's all the intended behavior for such systems.
Yah, I had the hunch you're talking about pure clients... :)
And as such, they should not even try to load ATL because they don't have ECC memory.
And if so, we probably should check somewhere whether ECC is even enabled on the system and then stop loading if not...
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 9 lines · Borislav Petkov
Quoted 7 lines · Mario Limonciello
Well in this case the platform /doesn't/ have PRM. The implication is we're not going to have DF support either if the system doesn't have PRM.
We pass the error codes up so the caller of
amd_atl_init()will fail init and thus the UMC decoder won't work.That's all the intended behavior for such systems.
Quoted 8 lines
Yah, I had the hunch you're talking about pure clients... :)
And as such, they should not even try to load ATL because they don't have ECC memory.
And if so, we probably should check somewhere whether ECC is even enabled on the system and then stop loading if not...
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Borislav Petkov
maintainerQuoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Probably...
And we already do that in amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteYazen Ghannam
maintainerQuoted 9 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...
How about having EDAC load ATL when ready?
Thanks,
Yazen
---
From d4e3cdb2efb34ccb2c234a4b227d0301327ad340 Mon Sep 17 00:00:00 2001
From: Yazen Ghannam <[email protected]>
Date: Sat, 7 Mar 2026 08:58:56 -0500
Subject: [PATCH] RAS/AMD/ATL, EDAC/amd64: Only load ATL when needed
The AMD Address Translation Library (ATL) will attempt to load on all AMD Zen/SMCA systems.
However, only systems with DRAM ECC enabled will use the library. Other systems will fail to load the library and produce an unnecessary message to the user.
Remove the ATL module dependency table to prevent autoloading. Request ATL to load from EDAC once all system checks are complete.
--- drivers/edac/amd64_edac.c | 2 ++ drivers/ras/amd/atl/core.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/edac/amd64_edac.c +2 -0
@@ -4170,6 +4170,8 @@ static int __init amd64_edac_init(void) goto err_pci; } +request_module ("amd_atl" ); +/* register stuff with EDAC MCE */ if (boot_cpu_data.x86 >=0x17 ) {amd_register_ecc_decoder (decode_umc_error);
drivers/ras/amd/atl/core.c +0 -1
@@ -190,7 +190,6 @@ static const struct x86_cpu_id amd_atl_cpuids[] = { X86_MATCH_FEATURE(X86_FEATURE_ZEN, NULL), { } }; -MODULE_DEVICE_TABLE (x86cpu, amd_atl_cpuids);static int __init amd_atl_init (void ) {
Signature · 1 line
2.53.0
Borislav Petkov
maintainerQuoted 5 lines · Yazen Ghannam
Quoted 4 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Quoted 7 lines
Quoted 5 lines
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
The thing is, AMD_ATL can also be built-in so then request_module doesn't make sense.
Which means, if we have to "tie" it to amd64_edac detection, we'd have to make it synchronize its Kconfig setting to the CONFIG_EDAC_AMD64 setting.
Or we could simply say that AMD_ATL is a module only because if anything needs it, then anything should request it. And that makes sense because the address translation should be present only when something else loads which is at all capable of presenting addresses which can be translated.
IOW, AMD_ATL should not be builtin at all because, well, it doesn't make any sense for it to be. IOW, its existence alone on the system makes a little sense if there's no address producer like amd64_edac or whatever else calls amd_convert_umc_mca_addr_to_sys_addr()...
Hmmm.
It sure sounds weird...
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteYazen Ghannam
maintainerQuoted 25 lines · Borislav Petkov
Quoted 5 lines · Yazen Ghannam
Quoted 4 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Quoted 7 lines
Quoted 5 lines
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
The thing is,
AMD_ATLcan also be built-in so thenrequest_moduledoesn't make sense.Which means, if we have to "tie" it to
amd64_edacdetection, we'd have to make it synchronize itsKconfigsetting to theCONFIG_EDAC_AMD64setting.Or we could simply say that
AMD_ATLis a module only because if anything needs it, then anything should request it. And that makes sense because the address translation should be present only when something else loads which is at all capable of presenting addresses which can be translated.
Quoted 9 lines
IOW,
AMD_ATLshould not be builtin at all because, well, it doesn't make any sense for it to be. IOW, its existence alone on the system makes a little sense if there's no address producer likeamd64_edacor whatever else callsamd_convert_umc_mca_addr_to_sys_addr()...Hmmm.
It sure sounds weird...
So AMD_ATL *can* be built-in, but it is default 'N'. CONFIG_EDAC_AMD64 has 'imply AMD_ATL', so CONFIG_AMD_ATL=CONFIG_EDAC_AMD64.
If CONFIG_EDAC_AMD64=m, then CONFIG_AMD_ATL=m. I think this would be the default for most users. EDAC will fail to load on systems without DRAM ECC, so AMD_ATL won't load either.
If CONFIG_EDAC_AMD64=y, then CONFIG_AMD_ATL=y. I expect that a user that wants EDAC built-in knows their system will use it.
Thanks,
Yazen
Quoted 43 lines · Yazen Ghannam
Quoted 25 lines · Borislav Petkov
Quoted 5 lines · Yazen Ghannam
Quoted 4 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Quoted 7 lines
Quoted 5 lines
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
The thing is,
AMD_ATLcan also be built-in so thenrequest_moduledoesn't make sense.Which means, if we have to "tie" it to
amd64_edacdetection, we'd have to make it synchronize itsKconfigsetting to theCONFIG_EDAC_AMD64setting.Or we could simply say that
AMD_ATLis a module only because if anything needs it, then anything should request it. And that makes sense because the address translation should be present only when something else loads which is at all capable of presenting addresses which can be translated.Quoted 9 lines
IOW,
AMD_ATLshould not be builtin at all because, well, it doesn't make any sense for it to be. IOW, its existence alone on the system makes a little sense if there's no address producer likeamd64_edacor whatever else callsamd_convert_umc_mca_addr_to_sys_addr()...Hmmm.
It sure sounds weird...
So
AMD_ATL*can* be built-in, but it is default 'N'.CONFIG_EDAC_AMD64has 'implyAMD_ATL', soCONFIG_AMD_ATL=CONFIG_EDAC_AMD64.If
CONFIG_EDAC_AMD64=m, thenCONFIG_AMD_ATL=m. I think this would be the default for most users. EDAC will fail to load on systems without DRAM ECC, soAMD_ATLwon't load either.
Quoted 5 lines
If
CONFIG_EDAC_AMD64=y, thenCONFIG_AMD_ATL=y. I expect that a user that wants EDAC built-in knows their system will use it.Thanks,
Yazen
Are there "going" to be other consumers of AMD_ATL planned? I wonder if it should just be structured as part of amd64_edac and only registered once we know there is ECC support.
Yazen Ghannam
maintainerQuoted 47 lines · Mario Limonciello
Quoted 46 lines · Yazen Ghannam
Quoted 25 lines · Borislav Petkov
Quoted 5 lines · Yazen Ghannam
Quoted 4 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Quoted 7 lines
Quoted 5 lines
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
The thing is,
AMD_ATLcan also be built-in so thenrequest_moduledoesn't make sense.Which means, if we have to "tie" it to
amd64_edacdetection, we'd have to make it synchronize itsKconfigsetting to theCONFIG_EDAC_AMD64setting.Or we could simply say that
AMD_ATLis a module only because if anything needs it, then anything should request it. And that makes sense because the address translation should be present only when something else loads which is at all capable of presenting addresses which can be translated.Quoted 9 lines
IOW,
AMD_ATLshould not be builtin at all because, well, it doesn't make any sense for it to be. IOW, its existence alone on the system makes a little sense if there's no address producer likeamd64_edacor whatever else callsamd_convert_umc_mca_addr_to_sys_addr()...Hmmm.
It sure sounds weird...
So
AMD_ATL*can* be built-in, but it is default 'N'.CONFIG_EDAC_AMD64has 'implyAMD_ATL', soCONFIG_AMD_ATL=CONFIG_EDAC_AMD64.If
CONFIG_EDAC_AMD64=m, thenCONFIG_AMD_ATL=m. I think this would be the default for most users. EDAC will fail to load on systems without DRAM ECC, soAMD_ATLwon't load either.If
CONFIG_EDAC_AMD64=y, thenCONFIG_AMD_ATL=y. I expect that a user that wants EDAC built-in knows their system will use it.
Quoted 7 lines
Quoted 2 lines
Thanks,
YazenAre there "going" to be other consumers of
AMD_ATLplanned? I wonder if it should just be structured as part ofamd64_edacand only registered once we know there is ECC support.
Yes, actually address translation was once part of amd64_edac. But there is so much code that it was nice to move it to a separate library. Another example of this decoupling is with ACPI_ADXL that Intel uses.
There is another user of AMD_ATL: RAS_FMPM.
Also, I do have it in mind that AMD_ATL can be used by other places or independently. I have some old WIP where we use it with MCE to do preemptive page offlining.
EDAC for x86 is mostly counting and decoding. You could leverage address translation without wanting to use EDAC. And you can use EDAC without address translation.
Thanks,
Yazen
Quoted 66 lines · Yazen Ghannam
Quoted 47 lines · Mario Limonciello
Quoted 46 lines · Yazen Ghannam
Quoted 25 lines · Borislav Petkov
Quoted 5 lines · Yazen Ghannam
Quoted 4 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Quoted 7 lines
Quoted 5 lines
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
The thing is,
AMD_ATLcan also be built-in so thenrequest_moduledoesn't make sense.Which means, if we have to "tie" it to
amd64_edacdetection, we'd have to make it synchronize itsKconfigsetting to theCONFIG_EDAC_AMD64setting.Or we could simply say that
AMD_ATLis a module only because if anything needs it, then anything should request it. And that makes sense because the address translation should be present only when something else loads which is at all capable of presenting addresses which can be translated.Quoted 9 lines
IOW,
AMD_ATLshould not be builtin at all because, well, it doesn't make any sense for it to be. IOW, its existence alone on the system makes a little sense if there's no address producer likeamd64_edacor whatever else callsamd_convert_umc_mca_addr_to_sys_addr()...Hmmm.
It sure sounds weird...
So
AMD_ATL*can* be built-in, but it is default 'N'.CONFIG_EDAC_AMD64has 'implyAMD_ATL', soCONFIG_AMD_ATL=CONFIG_EDAC_AMD64.If
CONFIG_EDAC_AMD64=m, thenCONFIG_AMD_ATL=m. I think this would be the default for most users. EDAC will fail to load on systems without DRAM ECC, soAMD_ATLwon't load either.If
CONFIG_EDAC_AMD64=y, thenCONFIG_AMD_ATL=y. I expect that a user that wants EDAC built-in knows their system will use it.Quoted 7 lines
Quoted 2 lines
Thanks,
YazenAre there "going" to be other consumers of
AMD_ATLplanned? I wonder if it should just be structured as part ofamd64_edacand only registered once we know there is ECC support.Yes, actually address translation was once part of
amd64_edac. But there is so much code that it was nice to move it to a separate library. Another example of this decoupling is withACPI_ADXLthat Intel uses.There is another user of
AMD_ATL:RAS_FMPM.Also, I do have it in mind that
AMD_ATLcan be used by other places or independently. I have some old WIP where we use it with MCE to do preemptive page offlining.
Quoted 6 lines
EDAC for x86 is mostly counting and decoding. You could leverage address translation without wanting to use EDAC. And you can use EDAC without address translation.
Thanks,
Yazen
OK.
I don't think the assertion that amd-atl won't load by default on most systems without ECC is correct. It has a modalias that looks for features (X86_FEATURE_ZEN specifically).
alias: cpu:type:x86,ven*fam*mod*:feature:*00FC* alias: cpu:type:x86,ven*fam*mod*:feature:*0223*
If you look at this all in a vacuum - is turning down the messaging to debug for amd-atl so bad?
Yazen Ghannam
maintainerOn Tue, Mar 10, 2026 at 12:47:39PM -0500, Mario Limonciello wrote:
[...]
Quoted 8 lines
I don't think the assertion that amd-atl won't load by default on most systems without ECC is correct. It has a modalias that looks for features (
X86_FEATURE_ZENspecifically).alias: cpu:type:x86,ven*fam*mod*:feature:*00FC* alias: cpu:type:x86,ven*fam*mod*:feature:*0223*
Is this with the patch I attached?
Quoted 5 lines
If you look at this all in a vacuum - is turning down the messaging to debug for amd-atl so bad?
That works for me.
Thanks,
Yazen
Quoted 15 lines · Yazen Ghannam
On Tue, Mar 10, 2026 at 12:47:39PM -0500, Mario Limonciello wrote:
[...]Quoted 8 lines
I don't think the assertion that amd-atl won't load by default on most systems without ECC is correct. It has a modalias that looks for features (
X86_FEATURE_ZENspecifically).alias: cpu:type:x86,ven*fam*mod*:feature:*00FC* alias: cpu:type:x86,ven*fam*mod*:feature:*0223*Is this with the patch I attached?
Quoted 2 lines
Quoted 8 lines
Quoted 3 lines
If you look at this all in a vacuum - is turning down the messaging to debug for amd-atl so bad?
That works for me.
Thanks,
Yazen
Sorry; I totally missed that patch!
That should improve the situation for most people.
Mario Limonciello
Tested-by Deskhmukh ShrirangQuoted 30 lines · Yazen Ghannam
Quoted 9 lines · Borislav Petkov
Quoted 2 lines · Mario Limonciello
But don't you need to use UMC to discover that? Chicken and egg type of issue.
Probably...
And we already do that in
amd64_edac. So perhaps we could export an API or so. Yazen might have an idea...How about having EDAC load ATL when ready?
Thanks,
Yazen---
Quoted 1 line
From
d4e3cdb2efb34ccb2c234a4b227d0301327ad340Mon Sep 17 00:00:00 2001From: Yazen Ghannam <[email protected]>
Date: Sat, 7 Mar 2026 08:58:56 -0500
Subject: [PATCH] RAS/AMD/ATL, EDAC/amd64: Only load ATL when neededThe AMD Address Translation Library (ATL) will attempt to load on all AMD Zen/SMCA systems.
However, only systems with DRAM ECC enabled will use the library. Other systems will fail to load the library and produce an unnecessary message to the user.
Quoted 7 lines
Remove the ATL module dependency table to prevent autoloading. Request ATL to load from EDAC once all system checks are complete.
Fixes 3f3174996be6 ("RAS: Introduce AMD Address Translation Library")Reported-by Mario Limonciello <[email protected]>Signed-off-by Yazen Ghannam <[email protected]>
One of my colleagues tested it.
Quoted 23 lines
--- drivers/edac/amd64_edac.c | 2 ++ drivers/ras/amd/atl/core.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)drivers/edac/amd64_edac.c +2
-0@@ -4170,6 +4170,8 @@ static int __init amd64_edac_init(void) goto err_pci; } +request_module ("amd_atl" ); +/* register stuff with EDAC MCE */ if (boot_cpu_data.x86 >=0x17 ) {amd_register_ecc_decoder (decode_umc_error);drivers/ras/amd/atl/core.c +0
-0
drivers/ras/amd/atl/core.c static const struct x86_cpu_id amd_atl_cpuids[] = { · line 193
Quoted 4 lines
drivers/ras/amd/atl/core.c +0
-1@@ -190,7 +190,6 @@ static const struct x86_cpu_id amd_atl_cpuids[] = { X86_MATCH_FEATURE(X86_FEATURE_ZEN, NULL), { } }; -MODULE_DEVICE_TABLE (x86cpu, amd_atl_cpuids);
Pretty sure this means you can drop amd_atl_cpuids as well.
Quoted 3 lines
drivers/ras/amd/atl/core.c +0
-0static int __init amd_atl_init (void ) {
Yazen Ghannam
maintainerOn Wed, Mar 18, 2026 at 10:43:04AM -0500, Mario Limonciello wrote:
[...]
Quoted 11 lines
drivers/ras/amd/atl/core.c static const struct x86_cpu_id amd_atl_cpuids[] = { · line 193
Quoted 9 lines
drivers/ras/amd/atl/core.c +0
-1@@ -190,7 +190,6 @@ static const struct x86_cpu_id amd_atl_cpuids[] = { X86_MATCH_FEATURE(X86_FEATURE_ZEN, NULL), { } }; -MODULE_DEVICE_TABLE (x86cpu, amd_atl_cpuids);Pretty sure this means you can drop
amd_atl_cpuidsas well.
Yeah, maybe.
The request_module() in EDAC is unconditional. We use the same EDAC module for multiple generations of CPUs.
The amd_atl_cpuids check will keep the amd_atl module off the legacy systems.
We could redo the flow. But there needs to be a feature check somewhere. The proposed patch is the smallest diff I thought of at the time.
Thanks,
Yazen
Quoted 21 lines · Yazen Ghannam
On Wed, Mar 18, 2026 at 10:43:04AM -0500, Mario Limonciello wrote:
[...]
Quoted 11 lines
drivers/ras/amd/atl/core.c static const struct x86_cpu_id amd_atl_cpuids[] = { · line 193
Quoted 9 lines
drivers/ras/amd/atl/core.c +0
-1@@ -190,7 +190,6 @@ static const struct x86_cpu_id amd_atl_cpuids[] = { X86_MATCH_FEATURE(X86_FEATURE_ZEN, NULL), { } }; -MODULE_DEVICE_TABLE (x86cpu, amd_atl_cpuids);Pretty sure this means you can drop
amd_atl_cpuidsas well.Yeah, maybe.
The
request_module()in EDAC is unconditional. We use the same EDAC module for multiple generations of CPUs.
Quoted 8 lines
The
amd_atl_cpuidscheck will keep theamd_atlmodule off the legacy systems.We could redo the flow. But there needs to be a feature check somewhere. The proposed patch is the smallest diff I thought of at the time.
Thanks,
Yazen
Well to be fair there was CPU no check before - the module device table just controlled automatic loading.
But yeah I think a simple cpu feature check during probe along with the suggested change would solve this.