[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200810190958.GA3406209@yaz-nikka.amd.com>
Date: Mon, 10 Aug 2020 14:10:31 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: Feng zhou <zhoufeng.zf@...edance.com>
Cc: bp@...en8.de, mchehab@...nel.org, tony.luck@...el.com,
james.morse@....com, rrichter@...vell.com,
linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
liuxian.1@...edance.com
Subject: Re: [PATCH] x86/MCE/AMD, EDAC/mce_amd
On Sun, Aug 09, 2020 at 12:35:59PM +0800, Feng zhou wrote:
> From: zhoufeng <zhoufeng.zf@...edance.com>
>
> The edac_mce_amd module calls decode_dram_ecc() on AMD Family17h and
> later systems. This function is used in amd64_edac_mod to do
> system-specific decoding for DRAM ECC errors. The function takes a
> "NodeId" as a parameter.
>
> In AMD documentation, NodeId is used to identify a physical die in a
> system. This can be used to identify a node in the AMD_NB code and also
> it is used with umc_normaddr_to_sysaddr().
>
> However, the input used for decode_dram_ecc() is currently the NUMA node
> of a logical CPU. so this will cause the address translation function to
> fail or report incorrect results.
>
> Signed-off-by: zhoufeng <zhoufeng.zf@...edance.com>
> ---
> drivers/edac/mce_amd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
> index 325aedf46ff2..73c805113322 100644
> --- a/drivers/edac/mce_amd.c
> +++ b/drivers/edac/mce_amd.c
> @@ -996,7 +996,7 @@ static void decode_smca_error(struct mce *m)
> }
>
> if (bank_type == SMCA_UMC && xec == 0 && decode_dram_ecc)
> - decode_dram_ecc(cpu_to_node(m->extcpu), m);
> + decode_dram_ecc(topology_physical_package_id(m->extcpu), m);
This will break on Naples systems, because the NodeId and the physical
package ID will not match.
I can send a patch soon that will work for Naples, Rome, and later
systems.
Thanks,
Yazen
Powered by blists - more mailing lists