diff options
| author | Dave Jones <davej@suse.de> | 2002-02-08 01:43:16 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-02-08 01:43:16 -0800 |
| commit | 168c90690e55b73f8e13535cd69e42c01c2fda2e (patch) | |
| tree | 256e703af66488015118b5f115b9c62cacbb4802 /kernel | |
| parent | e0278a2ff8e57e923449076d662f312df3e13971 (diff) | |
[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.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/panic.c | 11 |
1 files changed, 8 insertions, 3 deletions
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"); |
