Skip to content

Commit 29337bc

Browse files
committed
x86/mce: Remove the redundant mce_hygon_feature_init()
JIRA: https://issues.redhat.com/browse/RHEL-118444 commit 053d180 Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Thu Dec 12 22:01:02 2024 +0800 x86/mce: Remove the redundant mce_hygon_feature_init() 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 Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 0385216 commit 29337bc

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

arch/x86/include/asm/mce.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ static inline bool amd_mce_is_memory_error(struct mce *m) { return false; };
386386
static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
387387
#endif
388388

389-
static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); }
390-
391389
unsigned long copy_mc_fragile_handle_tail(char *to, char *from, unsigned len);
392390

393391
#endif /* _ASM_X86_MCE_H */

arch/x86/kernel/cpu/mce/core.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,13 +2117,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
21172117
mce_intel_feature_init(c);
21182118
break;
21192119

2120-
case X86_VENDOR_AMD: {
2121-
mce_amd_feature_init(c);
2122-
break;
2123-
}
2124-
2120+
case X86_VENDOR_AMD:
21252121
case X86_VENDOR_HYGON:
2126-
mce_hygon_feature_init(c);
2122+
mce_amd_feature_init(c);
21272123
break;
21282124

21292125
case X86_VENDOR_CENTAUR:

0 commit comments

Comments
 (0)