Skip to content

Commit

Permalink
x86, mce: don't set up mce sysdev devices with mce=off
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed Feb 17, 2009
1 parent 52d168e commit 5b4408f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)

static int mce_available(struct cpuinfo_x86 *c)
{
if (mce_dont_init)
return 0;
return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
}

Expand Down Expand Up @@ -532,8 +534,7 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
{
mce_cpu_quirks(c);

if (mce_dont_init ||
!mce_available(c))
if (!mce_available(c))
return;

mce_init(NULL);
Expand Down Expand Up @@ -710,8 +711,7 @@ static int __init mcheck_disable(char *str)
return 1;
}

/* mce=off disables machine check. Note you can re-enable it later
using sysfs.
/* mce=off disables machine check.
mce=TOLERANCELEVEL (number, see above)
mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
mce=nobootlog Don't log MCEs from before booting. */
Expand Down

0 comments on commit 5b4408f

Please sign in to comment.