diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2010-04-03 14:34:56 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-19 03:36:48 -0400 |
commit | b2be05273a1744d175bf4b67f6665637bb9ac7a8 (patch) | |
tree | c0b6333fbc7a1834bfc0eec86dd204b1daacf1b4 /arch/parisc | |
parent | 8954da1f82a468deeeae3683252b5440e7f4ccbe (diff) |
panic: Allow warnings to set different taint flags
WARN() is used in some places to report firmware or hardware bugs that
are then worked-around. These bugs do not affect the stability of the
kernel and should not set the flag for TAINT_WARN. To allow for this,
add WARN_TAINT() and WARN_TAINT_ONCE() macros that take a taint number
as argument.
Architectures that implement warnings using trap instructions instead
of calls to warn_slowpath_*() now implement __WARN_TAINT(taint)
instead of __WARN().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Helge Deller <deller@gmx.de>
Tested-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/bug.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h index 75e46c557a16..72cfdb0cfdd1 100644 --- a/arch/parisc/include/asm/bug.h +++ b/arch/parisc/include/asm/bug.h | |||
@@ -44,7 +44,7 @@ | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 46 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
47 | #define __WARN() \ | 47 | #define __WARN_TAINT(taint) \ |
48 | do { \ | 48 | do { \ |
49 | asm volatile("\n" \ | 49 | asm volatile("\n" \ |
50 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | 50 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ |
@@ -54,11 +54,11 @@ | |||
54 | "\t.org 2b+%c3\n" \ | 54 | "\t.org 2b+%c3\n" \ |
55 | "\t.popsection" \ | 55 | "\t.popsection" \ |
56 | : : "i" (__FILE__), "i" (__LINE__), \ | 56 | : : "i" (__FILE__), "i" (__LINE__), \ |
57 | "i" (BUGFLAG_WARNING), \ | 57 | "i" (BUGFLAG_TAINT(taint)), \ |
58 | "i" (sizeof(struct bug_entry)) ); \ | 58 | "i" (sizeof(struct bug_entry)) ); \ |
59 | } while(0) | 59 | } while(0) |
60 | #else | 60 | #else |
61 | #define __WARN() \ | 61 | #define __WARN_TAINT(taint) \ |
62 | do { \ | 62 | do { \ |
63 | asm volatile("\n" \ | 63 | asm volatile("\n" \ |
64 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | 64 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ |
@@ -67,7 +67,7 @@ | |||
67 | "\t.short %c0\n" \ | 67 | "\t.short %c0\n" \ |
68 | "\t.org 2b+%c1\n" \ | 68 | "\t.org 2b+%c1\n" \ |
69 | "\t.popsection" \ | 69 | "\t.popsection" \ |
70 | : : "i" (BUGFLAG_WARNING), \ | 70 | : : "i" (BUGFLAG_TAINT(taint)), \ |
71 | "i" (sizeof(struct bug_entry)) ); \ | 71 | "i" (sizeof(struct bug_entry)) ); \ |
72 | } while(0) | 72 | } while(0) |
73 | #endif | 73 | #endif |