aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-02-12 07:39:30 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-17 18:32:50 -0500
commit5b4408fdaa62474dd9485cddb9126370d90d4b82 (patch)
treede7b83f9e2a9a722ee70b468f5a21ba4f3b00bc2 /arch/x86/kernel/cpu
parent52d168e28bc11dd026b620fe1767cadde5a747cd (diff)
x86, mce: don't set up mce sysdev devices with mce=off
Impact: bug fix, in this case the resume handler shouldn't run which avoids incorrectly reenabling machine checks on resume When MCEs are completely disabled on the command line don't set up the sysdev devices for them either. Includes a comment fix from Thomas Gleixner. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 3f0550d16f3c..4e2b1bc5131c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -151,6 +151,8 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
151 151
152static int mce_available(struct cpuinfo_x86 *c) 152static int mce_available(struct cpuinfo_x86 *c)
153{ 153{
154 if (mce_dont_init)
155 return 0;
154 return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA); 156 return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
155} 157}
156 158
@@ -532,8 +534,7 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
532{ 534{
533 mce_cpu_quirks(c); 535 mce_cpu_quirks(c);
534 536
535 if (mce_dont_init || 537 if (!mce_available(c))
536 !mce_available(c))
537 return; 538 return;
538 539
539 mce_init(NULL); 540 mce_init(NULL);
@@ -710,8 +711,7 @@ static int __init mcheck_disable(char *str)
710 return 1; 711 return 1;
711} 712}
712 713
713/* mce=off disables machine check. Note you can re-enable it later 714/* mce=off disables machine check.
714 using sysfs.
715 mce=TOLERANCELEVEL (number, see above) 715 mce=TOLERANCELEVEL (number, see above)
716 mce=bootlog Log MCEs from before booting. Disabled by default on AMD. 716 mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
717 mce=nobootlog Don't log MCEs from before booting. */ 717 mce=nobootlog Don't log MCEs from before booting. */