Skip to content

Commit 053d180

Browse files
qzhuo2bp3tk0v
authored andcommitted
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 <[email protected]> Signed-off-by: Qiuxu Zhuo <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Sohil Mehta <[email protected]> Reviewed-by: Yazen Ghannam <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 359d7a9 commit 053d180

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
@@ -2118,13 +2118,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
21182118
mce_intel_feature_init(c);
21192119
break;
21202120

2121-
case X86_VENDOR_AMD: {
2122-
mce_amd_feature_init(c);
2123-
break;
2124-
}
2125-
2121+
case X86_VENDOR_AMD:
21262122
case X86_VENDOR_HYGON:
2127-
mce_hygon_feature_init(c);
2123+
mce_amd_feature_init(c);
21282124
break;
21292125

21302126
case X86_VENDOR_CENTAUR:

0 commit comments

Comments
 (0)