]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/mce: Remove the redundant mce_hygon_feature_init()
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Thu, 12 Dec 2024 14:01:02 +0000 (22:01 +0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 31 Dec 2024 10:12:45 +0000 (11:12 +0100)
Get HYGON to directly call mce_amd_feature_init() and remove the redundant
mce_hygon_feature_init().

Suggested-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lore.kernel.org/r/20241212140103.66964-7-qiuxu.zhuo@intel.com
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mce/core.c

index ea9ca7689f6b0291752a6ee75481bbed6c0197f4..eb2db07ef39c84bfa4f984db8081e0aec6b67fb5 100644 (file)
@@ -386,8 +386,6 @@ static inline bool amd_mce_is_memory_error(struct mce *m)           { return false; };
 static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)         { }
 #endif
 
-static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c)       { return mce_amd_feature_init(c); }
-
 unsigned long copy_mc_fragile_handle_tail(char *to, char *from, unsigned len);
 
 #endif /* _ASM_X86_MCE_H */
index f90cbcb31a62083f47d000e574dc222b7b2161a8..0dc00c9894c7cc90e4da6780cc139b93f5e05fee 100644 (file)
@@ -2118,13 +2118,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
                mce_intel_feature_init(c);
                break;
 
-       case X86_VENDOR_AMD: {
-               mce_amd_feature_init(c);
-               break;
-               }
-
+       case X86_VENDOR_AMD:
        case X86_VENDOR_HYGON:
-               mce_hygon_feature_init(c);
+               mce_amd_feature_init(c);
                break;
 
        case X86_VENDOR_CENTAUR: