aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
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/s390
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/s390')
-rw-r--r--arch/s390/include/asm/bug.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h
index 9beeb9db9b23..bf90d1fd97a5 100644
--- a/arch/s390/include/asm/bug.h
+++ b/arch/s390/include/asm/bug.h
@@ -46,18 +46,18 @@
46 unreachable(); \ 46 unreachable(); \
47} while (0) 47} while (0)
48 48
49#define __WARN() do { \ 49#define __WARN_TAINT(taint) do { \
50 __EMIT_BUG(BUGFLAG_WARNING); \ 50 __EMIT_BUG(BUGFLAG_TAINT(taint)); \
51} while (0) 51} while (0)
52 52
53#define WARN_ON(x) ({ \ 53#define WARN_ON(x) ({ \
54 int __ret_warn_on = !!(x); \ 54 int __ret_warn_on = !!(x); \
55 if (__builtin_constant_p(__ret_warn_on)) { \ 55 if (__builtin_constant_p(__ret_warn_on)) { \
56 if (__ret_warn_on) \ 56 if (__ret_warn_on) \
57 __EMIT_BUG(BUGFLAG_WARNING); \ 57 __WARN(); \
58 } else { \ 58 } else { \
59 if (unlikely(__ret_warn_on)) \ 59 if (unlikely(__ret_warn_on)) \
60 __EMIT_BUG(BUGFLAG_WARNING); \ 60 __WARN(); \
61 } \ 61 } \
62 unlikely(__ret_warn_on); \ 62 unlikely(__ret_warn_on); \
63}) 63})