mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Acked-by: Helge Deller <[email protected]> Tested-by: Paul Mundt <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
8954da1f82
commit
b2be05273a
8 changed files with 67 additions and 20 deletions
|
|
@ -44,7 +44,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
#define __WARN() \
|
||||
#define __WARN_TAINT(taint) \
|
||||
do { \
|
||||
asm volatile("\n" \
|
||||
"1:\t" PARISC_BUG_BREAK_ASM "\n" \
|
||||
|
|
@ -54,11 +54,11 @@
|
|||
"\t.org 2b+%c3\n" \
|
||||
"\t.popsection" \
|
||||
: : "i" (__FILE__), "i" (__LINE__), \
|
||||
"i" (BUGFLAG_WARNING), \
|
||||
"i" (BUGFLAG_TAINT(taint)), \
|
||||
"i" (sizeof(struct bug_entry)) ); \
|
||||
} while(0)
|
||||
#else
|
||||
#define __WARN() \
|
||||
#define __WARN_TAINT(taint) \
|
||||
do { \
|
||||
asm volatile("\n" \
|
||||
"1:\t" PARISC_BUG_BREAK_ASM "\n" \
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
"\t.short %c0\n" \
|
||||
"\t.org 2b+%c1\n" \
|
||||
"\t.popsection" \
|
||||
: : "i" (BUGFLAG_WARNING), \
|
||||
: : "i" (BUGFLAG_TAINT(taint)), \
|
||||
"i" (sizeof(struct bug_entry)) ); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue