diff options
author | Andi Kleen <andi@firstfloor.org> | 2009-05-27 15:56:55 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-03 17:40:38 -0400 |
commit | f6fb0ac0869500323c78fa21992fe1933af61e91 (patch) | |
tree | 852fe5dfa4057f8f07b70b9ae38c114b01e248a9 /arch/x86 | |
parent | ca84f69697da0f004135e45b63ca560b6bd3554e (diff) |
x86, mce: store record length into memory struct mce anchor
This makes it easier for tools who want to extract the mcelog out of
crash images or memory dumps to adapt to changing struct mce size.
The length field replaces padding, so it's fully compatible.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/mce.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 63abf3b19432..0a61946d4396 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -59,7 +59,7 @@ struct mce_log { | |||
59 | unsigned len; /* = MCE_LOG_LEN */ | 59 | unsigned len; /* = MCE_LOG_LEN */ |
60 | unsigned next; | 60 | unsigned next; |
61 | unsigned flags; | 61 | unsigned flags; |
62 | unsigned pad0; | 62 | unsigned recordlen; /* length of struct mce */ |
63 | struct mce entry[MCE_LOG_LEN]; | 63 | struct mce entry[MCE_LOG_LEN]; |
64 | }; | 64 | }; |
65 | 65 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 784f6ae9d6f4..3db047e7a0fb 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -108,8 +108,9 @@ EXPORT_PER_CPU_SYMBOL_GPL(injectm); | |||
108 | */ | 108 | */ |
109 | 109 | ||
110 | static struct mce_log mcelog = { | 110 | static struct mce_log mcelog = { |
111 | MCE_LOG_SIGNATURE, | 111 | .signature = MCE_LOG_SIGNATURE, |
112 | MCE_LOG_LEN, | 112 | .len = MCE_LOG_LEN, |
113 | .recordlen = sizeof(struct mce), | ||
113 | }; | 114 | }; |
114 | 115 | ||
115 | void mce_log(struct mce *mce) | 116 | void mce_log(struct mce *mce) |