EDAC/amd64: Get UMC channel from the 6th nibble for Hygon

On Hygon family 18h platforms, we look at the 6th nibble(bit 20~23)
in the instance_id to derive the channel number.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
Reviewed-by: Bin Lai <robinlai@tencent.com>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
Reviewed-by: caelli <caelli@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
This commit is contained in:
Pu Wen 2023-06-08 12:37:49 +08:00 committed by Jianping Liu
parent 038d8bb6ce
commit 98cb40237c
1 changed files with 3 additions and 0 deletions

View File

@ -2707,6 +2707,9 @@ static inline void decode_bus_error(int node_id, struct mce *m)
*/ */
static int find_umc_channel(struct mce *m) static int find_umc_channel(struct mce *m)
{ {
if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON &&
boot_cpu_data.x86 == 0x18)
return (m->ipid & GENMASK(23, 0)) >> 20;
return (m->ipid & GENMASK(31, 0)) >> 20; return (m->ipid & GENMASK(31, 0)) >> 20;
} }