aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-08 06:31:26 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-28 12:24:11 -0400
commitdba3725d44f5dfb5711fd509fca10b5b828c43b7 (patch)
treeebf07a2560a85259de700593f340be5183289508 /arch
parent711c2e481c9d1113650d09de10f61ee88ab56fda (diff)
x86, mce: unify
move mce_64.c => mce.c and glue it up in the Makefile. Remove mce_32.c Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/mcheck/Makefile2
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c (renamed from arch/x86/kernel/cpu/mcheck/mce_64.c)0
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_32.c77
3 files changed, 1 insertions, 78 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/Makefile b/arch/x86/kernel/cpu/mcheck/Makefile
index 6def76942bf2..55f01b39a105 100644
--- a/arch/x86/kernel/cpu/mcheck/Makefile
+++ b/arch/x86/kernel/cpu/mcheck/Makefile
@@ -1,4 +1,4 @@
1obj-y = mce_$(BITS).o therm_throt.o 1obj-y = mce.o therm_throt.o
2 2
3obj-$(CONFIG_X86_32) += k7.o p4.o p5.o p6.o winchip.o 3obj-$(CONFIG_X86_32) += k7.o p4.o p5.o p6.o winchip.o
4obj-$(CONFIG_X86_MCE_P4THERMAL) += mce_intel.o 4obj-$(CONFIG_X86_MCE_P4THERMAL) += mce_intel.o
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 2e2c3d2e9586..2e2c3d2e9586 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
diff --git a/arch/x86/kernel/cpu/mcheck/mce_32.c b/arch/x86/kernel/cpu/mcheck/mce_32.c
deleted file mode 100644
index 05979e7eff12..000000000000
--- a/arch/x86/kernel/cpu/mcheck/mce_32.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * mce.c - x86 Machine Check Exception Reporting
3 * (c) 2002 Alan Cox <alan@lxorguk.ukuu.org.uk>, Dave Jones <davej@redhat.com>
4 */
5#include <linux/thread_info.h>
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/types.h>
9#include <linux/init.h>
10#include <linux/smp.h>
11
12#include <asm/processor.h>
13#include <asm/system.h>
14#include <asm/mce.h>
15
16#include "mce.h"
17
18int mce_disabled;
19
20int nr_mce_banks;
21EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */
22
23/* Handle unconfigured int18 (should never happen) */
24static void unexpected_machine_check(struct pt_regs *regs, long error_code)
25{
26 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
27 smp_processor_id());
28}
29
30/* Call the installed machine check handler for this CPU setup. */
31void (*machine_check_vector)(struct pt_regs *, long error_code) =
32 unexpected_machine_check;
33
34/* This has to be run for each processor */
35void mcheck_init(struct cpuinfo_x86 *c)
36{
37 if (mce_disabled == 1)
38 return;
39
40 switch (c->x86_vendor) {
41 case X86_VENDOR_AMD:
42 amd_mcheck_init(c);
43 break;
44
45 case X86_VENDOR_INTEL:
46 if (c->x86 == 5)
47 intel_p5_mcheck_init(c);
48 if (c->x86 == 6)
49 intel_p6_mcheck_init(c);
50 if (c->x86 == 15)
51 intel_p4_mcheck_init(c);
52 break;
53
54 case X86_VENDOR_CENTAUR:
55 if (c->x86 == 5)
56 winchip_mcheck_init(c);
57 break;
58
59 default:
60 break;
61 }
62}
63
64static int __init mcheck_disable(char *str)
65{
66 mce_disabled = 1;
67 return 1;
68}
69
70static int __init mcheck_enable(char *str)
71{
72 mce_disabled = -1;
73 return 1;
74}
75
76__setup("nomce", mcheck_disable);
77__setup("mce", mcheck_enable);