Commit 07f3e21d authored by Pu Wen's avatar Pu Wen
Browse files

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

hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8U3K8


CVE: NA

---------------------------

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: default avatarPu Wen <puwen@hygon.cn>
parent d553095c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3057,6 +3057,10 @@ static inline void decode_bus_error(int node_id, struct mce *m)
 */
static void umc_get_err_info(struct mce *m, struct err_info *err)
{
	if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON &&
	    boot_cpu_data.x86 == 0x18)
		err->channel = (m->ipid & GENMASK(23, 0)) >> 20;
	else
		err->channel = (m->ipid & GENMASK(31, 0)) >> 20;
	err->csrow = m->synd & 0x7;
}