diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-08 06:31:26 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-28 12:24:11 -0400 |
commit | 711c2e481c9d1113650d09de10f61ee88ab56fda (patch) | |
tree | fec0cad6aa5f8c0884c04049e8071ff86165bab9 | |
parent | a988d334ae8213c0e0e62327222f6e5e6e52bcf1 (diff) |
x86, mce: unify, prepare for 32-bit v2
Prepare the 64-bit mce_64.c code side to be built on 32-bit.
[ includes ifdef relocation by Andi Kleen ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@firstfloor.org>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.h b/arch/x86/kernel/cpu/mcheck/mce.h index 2d1a54bdadfc..cd6cffcc2de0 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.h +++ b/arch/x86/kernel/cpu/mcheck/mce.h | |||
@@ -1,14 +1,14 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <asm/mce.h> | 2 | #include <asm/mce.h> |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | ||
5 | |||
6 | void amd_mcheck_init(struct cpuinfo_x86 *c); | 4 | void amd_mcheck_init(struct cpuinfo_x86 *c); |
7 | void intel_p4_mcheck_init(struct cpuinfo_x86 *c); | 5 | void intel_p4_mcheck_init(struct cpuinfo_x86 *c); |
8 | void intel_p5_mcheck_init(struct cpuinfo_x86 *c); | 6 | void intel_p5_mcheck_init(struct cpuinfo_x86 *c); |
9 | void intel_p6_mcheck_init(struct cpuinfo_x86 *c); | 7 | void intel_p6_mcheck_init(struct cpuinfo_x86 *c); |
10 | void winchip_mcheck_init(struct cpuinfo_x86 *c); | 8 | void winchip_mcheck_init(struct cpuinfo_x86 *c); |
11 | 9 | ||
10 | #ifdef CONFIG_X86_32 | ||
11 | |||
12 | /* Call the installed machine check handler for this CPU setup. */ | 12 | /* Call the installed machine check handler for this CPU setup. */ |
13 | extern void (*machine_check_vector)(struct pt_regs *, long error_code); | 13 | extern void (*machine_check_vector)(struct pt_regs *, long error_code); |
14 | 14 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index ce48ae75e1dc..2e2c3d2e9586 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -37,6 +37,10 @@ | |||
37 | #include <asm/msr.h> | 37 | #include <asm/msr.h> |
38 | #include <asm/smp.h> | 38 | #include <asm/smp.h> |
39 | 39 | ||
40 | #include "mce.h" | ||
41 | |||
42 | #ifdef CONFIG_X86_64 | ||
43 | |||
40 | #define MISC_MCELOG_MINOR 227 | 44 | #define MISC_MCELOG_MINOR 227 |
41 | 45 | ||
42 | atomic_t mce_entry; | 46 | atomic_t mce_entry; |
@@ -1241,7 +1245,7 @@ static __init int mce_init_device(void) | |||
1241 | 1245 | ||
1242 | device_initcall(mce_init_device); | 1246 | device_initcall(mce_init_device); |
1243 | 1247 | ||
1244 | #ifdef CONFIG_X86_32 | 1248 | #else /* CONFIG_X86_32: */ |
1245 | 1249 | ||
1246 | int mce_disabled; | 1250 | int mce_disabled; |
1247 | 1251 | ||