diff options
author | Andi Kleen <ak@linux.intel.com> | 2009-04-28 17:07:25 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-28 12:24:12 -0400 |
commit | d7c3c9a609563868d8a70e220399d06a25aba095 (patch) | |
tree | 48e01aead3d492f4b4ec3d22c7e735f7742a6c62 /arch | |
parent | 04b2b1a4df6cd0fdaa598f3c623a19c2d93cb48a (diff) |
x86, mce: move mce_disabled option into common 32bit/64bit code
It's the same function, so let's share it.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
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/mce.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 6ab477060f56..5395200dc9d9 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -908,16 +908,6 @@ static struct miscdevice mce_log_device = { | |||
908 | }; | 908 | }; |
909 | 909 | ||
910 | /* | 910 | /* |
911 | * Old style boot options parsing. Only for compatibility. | ||
912 | */ | ||
913 | static int __init mcheck_disable(char *str) | ||
914 | { | ||
915 | mce_disabled = 1; | ||
916 | return 1; | ||
917 | } | ||
918 | __setup("nomce", mcheck_disable); | ||
919 | |||
920 | /* | ||
921 | * mce=off disables machine check | 911 | * mce=off disables machine check |
922 | * mce=TOLERANCELEVEL (number, see above) | 912 | * mce=TOLERANCELEVEL (number, see above) |
923 | * mce=bootlog Log MCEs from before booting. Disabled by default on AMD. | 913 | * mce=bootlog Log MCEs from before booting. Disabled by default on AMD. |
@@ -1327,19 +1317,22 @@ void mcheck_init(struct cpuinfo_x86 *c) | |||
1327 | printk(KERN_INFO "mce: CPU supports %d MCE banks\n", nr_mce_banks); | 1317 | printk(KERN_INFO "mce: CPU supports %d MCE banks\n", nr_mce_banks); |
1328 | } | 1318 | } |
1329 | 1319 | ||
1330 | static int __init mcheck_disable(char *str) | ||
1331 | { | ||
1332 | mce_disabled = 1; | ||
1333 | return 1; | ||
1334 | } | ||
1335 | |||
1336 | static int __init mcheck_enable(char *str) | 1320 | static int __init mcheck_enable(char *str) |
1337 | { | 1321 | { |
1338 | mce_disabled = -1; | 1322 | mce_disabled = -1; |
1339 | return 1; | 1323 | return 1; |
1340 | } | 1324 | } |
1341 | 1325 | ||
1342 | __setup("nomce", mcheck_disable); | ||
1343 | __setup("mce", mcheck_enable); | 1326 | __setup("mce", mcheck_enable); |
1344 | 1327 | ||
1345 | #endif /* CONFIG_X86_32 */ | 1328 | #endif /* CONFIG_X86_OLD_MCE */ |
1329 | |||
1330 | /* | ||
1331 | * Old style boot options parsing. Only for compatibility. | ||
1332 | */ | ||
1333 | static int __init mcheck_disable(char *str) | ||
1334 | { | ||
1335 | mce_disabled = 1; | ||
1336 | return 1; | ||
1337 | } | ||
1338 | __setup("nomce", mcheck_disable); | ||