aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndi Kleen <ak@muc.de>2004-10-18 18:14:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-18 18:14:38 -0700
commit57b47f9da9d62a94f76928872c9ac93721c006de (patch)
tree1c5e8409999eaf9109b1f4924e3ef605ffd0a333 /kernel
parentf5cda072937763f8b5903e625ac4d4fb701c551c (diff)
downloadhistory-57b47f9da9d62a94f76928872c9ac93721c006de.tar.gz
[PATCH] x86-64/i386: add mce tainting
This patch adds machine check tainting. When a handled machine check occurs the oops gets a new 'M' flag. This is useful to ignore machines with hardware problems in oops reports. On i386 a thermal failure also sets this flag. Done for x86-64 and i386 so far. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/panic.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index fce7f4030d0a75..a98656f049b37d 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -110,6 +110,7 @@ EXPORT_SYMBOL(panic);
* 'P' - Proprietary module has been loaded.
* 'F' - Module has been forcibly loaded.
* 'S' - SMP with CPUs not designed for SMP.
+ * 'M' - Machine had a machine check experience.
*
* The string is overwritten by the next call to print_taint().
*/
@@ -118,12 +119,19 @@ const char *print_tainted(void)
{
static char buf[20];
if (tainted) {
- snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
+ snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c",
tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
- tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
+ tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
+ tainted & TAINT_MACHINE_CHECK ? 'M' : ' ');
}
else
snprintf(buf, sizeof(buf), "Not tainted");
return(buf);
}
+
+void add_taint(unsigned flag)
+{
+ tainted |= flag;
+}
+EXPORT_SYMBOL(add_taint);