From 168c90690e55b73f8e13535cd69e42c01c2fda2e Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 8 Feb 2002 01:43:16 -0800 Subject: [PATCH] handle out of spec SMP athlons. Newer Athlons have means of checking if they are SMP capable or not. This code adds checks that printk a warning on systems not intended for SMP, and set the taint flag that modutils is already aware of. The taint code is also improved to use defines instead of magic numbers. --- kernel/panic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'kernel') diff --git a/kernel/panic.c b/kernel/panic.c index 1eccb0e0c749..84adabf00cf5 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -103,6 +103,10 @@ NORET_TYPE void panic(const char * fmt, ...) /** * print_tainted - return a string to represent the kernel taint state. * + * 'P' - Proprietory module has been loaded. + * 'F' - Module has been forcibly loaded. + * 'S' - SMP with CPUs not designed for SMP. + * * The string is overwritten by the next call to print_taint(). */ @@ -110,9 +114,10 @@ const char *print_tainted() { static char buf[20]; if (tainted) { - snprintf(buf, sizeof(buf), "Tainted: %c%c", - tainted & 1 ? 'P' : 'G', - tainted & 2 ? 'F' : ' '); + snprintf(buf, sizeof(buf), "Tainted: %c%c%c", + tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G', + tainted & TAINT_FORCED_MODULE ? 'F' : ' ', + tainted & TAINT_UNSAFE_SMP ? 'S' : ' '); } else snprintf(buf, sizeof(buf), "Not tainted"); -- cgit v1.2.3