Commit ce8672f5 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/I7DX6V


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 a2e4e35b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2905,6 +2905,9 @@ static inline void decode_bus_error(int node_id, 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;
}