aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2019-03-22 16:29:00 -0400
committerBorislav Petkov <bp@suse.de>2019-03-24 05:54:13 -0400
commit9308fd4074551f222f30322d1ee8c5aff18e9747 (patch)
treed13d33a7fba462a3068575142a02458f67b35427
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
x86/MCE: Group AMD function prototypes in <asm/mce.h>
There are two groups of "ifdef CONFIG_X86_MCE_AMD" function prototypes in <asm/mce.h>. Merge these two groups. No functional change. [ bp: align vertically. ] Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "clemej@gmail.com" <clemej@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Pu Wen <puwen@hygon.cn> Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Cc: "rafal@milecki.pl" <rafal@milecki.pl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20190322202848.20749-3-Yazen.Ghannam@amd.com
-rw-r--r--arch/x86/include/asm/mce.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 22d05e3835f0..dc2d4b206ab7 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -210,16 +210,6 @@ static inline void cmci_rediscover(void) {}
210static inline void cmci_recheck(void) {} 210static inline void cmci_recheck(void) {}
211#endif 211#endif
212 212
213#ifdef CONFIG_X86_MCE_AMD
214void mce_amd_feature_init(struct cpuinfo_x86 *c);
215int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr);
216#else
217static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
218static inline int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr) { return -EINVAL; };
219#endif
220
221static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); }
222
223int mce_available(struct cpuinfo_x86 *c); 213int mce_available(struct cpuinfo_x86 *c);
224bool mce_is_memory_error(struct mce *m); 214bool mce_is_memory_error(struct mce *m);
225bool mce_is_correctable(struct mce *m); 215bool mce_is_correctable(struct mce *m);
@@ -345,12 +335,19 @@ extern bool amd_mce_is_memory_error(struct mce *m);
345extern int mce_threshold_create_device(unsigned int cpu); 335extern int mce_threshold_create_device(unsigned int cpu);
346extern int mce_threshold_remove_device(unsigned int cpu); 336extern int mce_threshold_remove_device(unsigned int cpu);
347 337
348#else 338void mce_amd_feature_init(struct cpuinfo_x86 *c);
339int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr);
349 340
350static inline int mce_threshold_create_device(unsigned int cpu) { return 0; }; 341#else
351static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
352static inline bool amd_mce_is_memory_error(struct mce *m) { return false; };
353 342
343static inline int mce_threshold_create_device(unsigned int cpu) { return 0; };
344static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
345static inline bool amd_mce_is_memory_error(struct mce *m) { return false; };
346static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
347static inline int
348umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr) { return -EINVAL; };
354#endif 349#endif
355 350
351static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); }
352
356#endif /* _ASM_X86_MCE_H */ 353#endif /* _ASM_X86_MCE_H */