Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mce-internal.h
Go to the documentation of this file.
1 #include <linux/device.h>
2 #include <asm/mce.h>
3 
12 };
13 
14 #define ATTR_LEN 16
15 
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 */
22 };
23 
24 int mce_severity(struct mce *a, int tolerant, char **msg);
25 struct dentry *mce_get_debugfs_dir(void);
26 
27 extern int mce_ser;
28 
29 extern struct mce_bank *mce_banks;
30 
31 #ifdef CONFIG_X86_MCE_INTEL
32 unsigned long mce_intel_adjust_timer(unsigned long interval);
33 void mce_intel_cmci_poll(void);
34 void mce_intel_hcpu_update(unsigned long cpu);
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 #endif
40 
41 void mce_timer_kick(unsigned long interval);
42 
43 #ifdef CONFIG_ACPI_APEI
44 int apei_write_mce(struct mce *m);
45 ssize_t apei_read_mce(struct mce *m, u64 *record_id);
46 int apei_check_mce(void);
47 int apei_clear_mce(u64 record_id);
48 #else
49 static inline int apei_write_mce(struct mce *m)
50 {
51  return -EINVAL;
52 }
53 static inline ssize_t apei_read_mce(struct mce *m, u64 *record_id)
54 {
55  return 0;
56 }
57 static inline int apei_check_mce(void)
58 {
59  return 0;
60 }
61 static inline int apei_clear_mce(u64 record_id)
62 {
63  return -EINVAL;
64 }
65 #endif