Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e583538f authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Log machine checks from boot on Intel systems



The logging for boot errors was turned off because it was broken
on some AMD systems. But give Intel EM64T systems a chance because they are
supposed to be correct there.

The advantage is that there is a chance to actually log uncorrected
machine checks after the reset.

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b0bd35e6
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -7,10 +7,12 @@ Machine check


   mce=off disable machine check
   mce=off disable machine check
   mce=bootlog Enable logging of machine checks left over from booting.
   mce=bootlog Enable logging of machine checks left over from booting.
               Disabled by default because some BIOS leave bogus ones.
               Disabled by default on AMD because some BIOS leave bogus ones.
               If your BIOS doesn't do that it's a good idea to enable though
               If your BIOS doesn't do that it's a good idea to enable though
               to make sure you log even machine check events that result
               to make sure you log even machine check events that result
               in a reboot.
               in a reboot. On Intel systems it is enabled by default.
   mce=nobootlog
		Disable boot machine check logging.
   mce=tolerancelevel (number)
   mce=tolerancelevel (number)
		0: always panic, 1: panic if deadlock possible,
		0: always panic, 1: panic if deadlock possible,
		2: try to avoid panic, 3: never panic or exit (for testing)
		2: try to avoid panic, 3: never panic or exit (for testing)
+9 −5
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL };
static unsigned long console_logged;
static unsigned long console_logged;
static int notify_user;
static int notify_user;
static int rip_msr;
static int rip_msr;
static int mce_bootlog;
static int mce_bootlog = 1;


/*
/*
 * Lockless MCE logging infrastructure.
 * Lockless MCE logging infrastructure.
@@ -347,7 +347,11 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c)
		/* disable GART TBL walk error reporting, which trips off 
		/* disable GART TBL walk error reporting, which trips off 
		   incorrectly with the IOMMU & 3ware & Cerberus. */
		   incorrectly with the IOMMU & 3ware & Cerberus. */
		clear_bit(10, &bank[4]);
		clear_bit(10, &bank[4]);
		/* Lots of broken BIOS around that don't clear them
		   by default and leave crap in there. Don't log. */
		mce_bootlog = 0;
	}
	}

}			
}			


static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
@@ -498,16 +502,16 @@ static int __init mcheck_disable(char *str)
/* mce=off disables machine check. Note you can reenable it later
/* mce=off disables machine check. Note you can reenable it later
   using sysfs.
   using sysfs.
   mce=TOLERANCELEVEL (number, see above)
   mce=TOLERANCELEVEL (number, see above)
   mce=bootlog Log MCEs from before booting. Disabled by default to work
   mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
   around buggy BIOS that leave bogus MCEs.  */
   mce=nobootlog Don't log MCEs from before booting. */
static int __init mcheck_enable(char *str)
static int __init mcheck_enable(char *str)
{
{
	if (*str == '=')
	if (*str == '=')
		str++;
		str++;
	if (!strcmp(str, "off"))
	if (!strcmp(str, "off"))
		mce_dont_init = 1;
		mce_dont_init = 1;
	else if (!strcmp(str, "bootlog"))
	else if (!strcmp(str, "bootlog") || !strcmp(str,"nobootlog"))
		mce_bootlog = 1;
		mce_bootlog = str[0] == 'b';
	else if (isdigit(str[0]))
	else if (isdigit(str[0]))
		get_option(&str, &tolerant);
		get_option(&str, &tolerant);
	else
	else