aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/bug.h
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2010-04-03 14:34:56 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-05-19 03:36:48 -0400
commitb2be05273a1744d175bf4b67f6665637bb9ac7a8 (patch)
treec0b6333fbc7a1834bfc0eec86dd204b1daacf1b4 /arch/powerpc/include/asm/bug.h
parent8954da1f82a468deeeae3683252b5440e7f4ccbe (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/powerpc/include/asm/bug.h')
-rw-r--r--arch/powerpc/include/asm/bug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h
index 2c15212e1700..065c590c991d 100644
--- a/arch/powerpc/include/asm/bug.h
+++ b/arch/powerpc/include/asm/bug.h
@@ -85,12 +85,12 @@
85 } \ 85 } \
86} while (0) 86} while (0)
87 87
88#define __WARN() do { \ 88#define __WARN_TAINT(taint) do { \
89 __asm__ __volatile__( \ 89 __asm__ __volatile__( \
90 "1: twi 31,0,0\n" \ 90 "1: twi 31,0,0\n" \
91 _EMIT_BUG_ENTRY \ 91 _EMIT_BUG_ENTRY \
92 : : "i" (__FILE__), "i" (__LINE__), \ 92 : : "i" (__FILE__), "i" (__LINE__), \
93 "i" (BUGFLAG_WARNING), \ 93 "i" (BUGFLAG_TAINT(taint)), \
94 "i" (sizeof(struct bug_entry))); \ 94 "i" (sizeof(struct bug_entry))); \
95} while (0) 95} while (0)
96 96
@@ -104,7 +104,7 @@
104 "1: "PPC_TLNEI" %4,0\n" \ 104 "1: "PPC_TLNEI" %4,0\n" \
105 _EMIT_BUG_ENTRY \ 105 _EMIT_BUG_ENTRY \
106 : : "i" (__FILE__), "i" (__LINE__), \ 106 : : "i" (__FILE__), "i" (__LINE__), \
107 "i" (BUGFLAG_WARNING), \ 107 "i" (BUGFLAG_TAINT(TAINT_WARN)), \
108 "i" (sizeof(struct bug_entry)), \ 108 "i" (sizeof(struct bug_entry)), \
109 "r" (__ret_warn_on)); \ 109 "r" (__ret_warn_on)); \
110 } \ 110 } \