summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/mcheck/mce-internal.h
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-07-09 00:31:43 +0200
committerH. Peter Anvin <hpa@zytor.com>2009-07-09 18:39:47 -0700
commitcebe182033f156b430952370fb0f9dbe6e89b081 (patch)
tree21afc7228fa12c243f29b45ac670f9a9df2f4701 /arch/x86/kernel/cpu/mcheck/mce-internal.h
parent9eda8cb3ac235217e4ffa01cb9cedee1c1550599 (diff)
x86: mce: Move per bank data in a single datastructure
This addresses one of the leftover review comments. Move the per bank data into a single structure. This avoids several separate variables and also separate allocation of sysfs objects. I didn't move the CMCI ownership information so far because that would have needed some non trivial changes in the algorithms. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce-internal.h')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mcheck/mce-internal.h
index 54dcb8ff12e5..6bd51e7ba87b 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ b/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -1,3 +1,4 @@
+#include <linux/sysdev.h>
#include <asm/mce.h>
enum severity_level {
@@ -10,6 +11,19 @@ enum severity_level {
MCE_PANIC_SEVERITY,
};
+#define ATTR_LEN 16
+
+/* One object for each MCE bank, shared by all CPUs */
+struct mce_bank {
+ u64 ctl; /* subevents to enable */
+ unsigned char init; /* initialise bank? */
+ struct sysdev_attribute attr; /* sysdev attribute */
+ char attrname[ATTR_LEN]; /* attribute name */
+};
+
int mce_severity(struct mce *a, int tolerant, char **msg);
extern int mce_ser;
+
+extern struct mce_bank *mce_banks;
+