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/sh/include/asm | |
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/sh/include/asm')
-rw-r--r-- | arch/sh/include/asm/bug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h index d02c01b3e6b9..6323f864d111 100644 --- a/arch/sh/include/asm/bug.h +++ b/arch/sh/include/asm/bug.h | |||
@@ -48,7 +48,7 @@ do { \ | |||
48 | "i" (sizeof(struct bug_entry))); \ | 48 | "i" (sizeof(struct bug_entry))); \ |
49 | } while (0) | 49 | } while (0) |
50 | 50 | ||
51 | #define __WARN() \ | 51 | #define __WARN_TAINT(taint) \ |
52 | do { \ | 52 | do { \ |
53 | __asm__ __volatile__ ( \ | 53 | __asm__ __volatile__ ( \ |
54 | "1:\t.short %O0\n" \ | 54 | "1:\t.short %O0\n" \ |
@@ -57,7 +57,7 @@ do { \ | |||
57 | : "n" (TRAPA_BUG_OPCODE), \ | 57 | : "n" (TRAPA_BUG_OPCODE), \ |
58 | "i" (__FILE__), \ | 58 | "i" (__FILE__), \ |
59 | "i" (__LINE__), \ | 59 | "i" (__LINE__), \ |
60 | "i" (BUGFLAG_WARNING), \ | 60 | "i" (BUGFLAG_TAINT(taint)), \ |
61 | "i" (sizeof(struct bug_entry))); \ | 61 | "i" (sizeof(struct bug_entry))); \ |
62 | } while (0) | 62 | } while (0) |
63 | 63 | ||