x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / x86 / kernel / cpu / mcheck / mce-internal.h
blob09edd0b65fefbb1eda927e3af5ac84a8e4ab40cd
1 #include <linux/device.h>
2 #include <asm/mce.h>
4 enum severity_level {
5 MCE_NO_SEVERITY,
6 MCE_KEEP_SEVERITY,
7 MCE_SOME_SEVERITY,
8 MCE_AO_SEVERITY,
9 MCE_UC_SEVERITY,
10 MCE_AR_SEVERITY,
11 MCE_PANIC_SEVERITY,
14 #define ATTR_LEN 16
16 /* One object for each MCE bank, shared by all CPUs */
17 struct mce_bank {
18 u64 ctl; /* subevents to enable */
19 unsigned char init; /* initialise bank? */
20 struct device_attribute attr; /* device attribute */
21 char attrname[ATTR_LEN]; /* attribute name */
24 int mce_severity(struct mce *a, int tolerant, char **msg);
25 struct dentry *mce_get_debugfs_dir(void);
27 extern struct mce_bank *mce_banks;
28 extern mce_banks_t mce_banks_ce_disabled;
30 #ifdef CONFIG_X86_MCE_INTEL
31 unsigned long mce_intel_adjust_timer(unsigned long interval);
32 void mce_intel_cmci_poll(void);
33 void mce_intel_hcpu_update(unsigned long cpu);
34 void cmci_disable_bank(int bank);
35 #else
36 # define mce_intel_adjust_timer mce_adjust_timer_default
37 static inline void mce_intel_cmci_poll(void) { }
38 static inline void mce_intel_hcpu_update(unsigned long cpu) { }
39 static inline void cmci_disable_bank(int bank) { }
40 #endif
42 void mce_timer_kick(unsigned long interval);
44 #ifdef CONFIG_ACPI_APEI
45 int apei_write_mce(struct mce *m);
46 ssize_t apei_read_mce(struct mce *m, u64 *record_id);
47 int apei_check_mce(void);
48 int apei_clear_mce(u64 record_id);
49 #else
50 static inline int apei_write_mce(struct mce *m)
52 return -EINVAL;
54 static inline ssize_t apei_read_mce(struct mce *m, u64 *record_id)
56 return 0;
58 static inline int apei_check_mce(void)
60 return 0;
62 static inline int apei_clear_mce(u64 record_id)
64 return -EINVAL;
66 #endif