diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/panic.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 13d966b4c14a..dbe13dbb057a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -178,6 +178,7 @@ static const struct tnt tnts[] = { | |||
178 | { TAINT_OVERRIDDEN_ACPI_TABLE, 'A', ' ' }, | 178 | { TAINT_OVERRIDDEN_ACPI_TABLE, 'A', ' ' }, |
179 | { TAINT_WARN, 'W', ' ' }, | 179 | { TAINT_WARN, 'W', ' ' }, |
180 | { TAINT_CRAP, 'C', ' ' }, | 180 | { TAINT_CRAP, 'C', ' ' }, |
181 | { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' }, | ||
181 | }; | 182 | }; |
182 | 183 | ||
183 | /** | 184 | /** |
@@ -194,6 +195,7 @@ static const struct tnt tnts[] = { | |||
194 | * 'A' - ACPI table overridden. | 195 | * 'A' - ACPI table overridden. |
195 | * 'W' - Taint on warning. | 196 | * 'W' - Taint on warning. |
196 | * 'C' - modules from drivers/staging are loaded. | 197 | * 'C' - modules from drivers/staging are loaded. |
198 | * 'I' - Working around severe firmware bug. | ||
197 | * | 199 | * |
198 | * The string is overwritten by the next call to print_tainted(). | 200 | * The string is overwritten by the next call to print_tainted(). |
199 | */ | 201 | */ |
@@ -365,7 +367,8 @@ struct slowpath_args { | |||
365 | va_list args; | 367 | va_list args; |
366 | }; | 368 | }; |
367 | 369 | ||
368 | static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args) | 370 | static void warn_slowpath_common(const char *file, int line, void *caller, |
371 | unsigned taint, struct slowpath_args *args) | ||
369 | { | 372 | { |
370 | const char *board; | 373 | const char *board; |
371 | 374 | ||
@@ -381,7 +384,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc | |||
381 | print_modules(); | 384 | print_modules(); |
382 | dump_stack(); | 385 | dump_stack(); |
383 | print_oops_end_marker(); | 386 | print_oops_end_marker(); |
384 | add_taint(TAINT_WARN); | 387 | add_taint(taint); |
385 | } | 388 | } |
386 | 389 | ||
387 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | 390 | void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) |
@@ -390,14 +393,29 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) | |||
390 | 393 | ||
391 | args.fmt = fmt; | 394 | args.fmt = fmt; |
392 | va_start(args.args, fmt); | 395 | va_start(args.args, fmt); |
393 | warn_slowpath_common(file, line, __builtin_return_address(0), &args); | 396 | warn_slowpath_common(file, line, __builtin_return_address(0), |
397 | TAINT_WARN, &args); | ||
394 | va_end(args.args); | 398 | va_end(args.args); |
395 | } | 399 | } |
396 | EXPORT_SYMBOL(warn_slowpath_fmt); | 400 | EXPORT_SYMBOL(warn_slowpath_fmt); |
397 | 401 | ||
402 | void warn_slowpath_fmt_taint(const char *file, int line, | ||
403 | unsigned taint, const char *fmt, ...) | ||
404 | { | ||
405 | struct slowpath_args args; | ||
406 | |||
407 | args.fmt = fmt; | ||
408 | va_start(args.args, fmt); | ||
409 | warn_slowpath_common(file, line, __builtin_return_address(0), | ||
410 | taint, &args); | ||
411 | va_end(args.args); | ||
412 | } | ||
413 | EXPORT_SYMBOL(warn_slowpath_fmt_taint); | ||
414 | |||
398 | void warn_slowpath_null(const char *file, int line) | 415 | void warn_slowpath_null(const char *file, int line) |
399 | { | 416 | { |
400 | warn_slowpath_common(file, line, __builtin_return_address(0), NULL); | 417 | warn_slowpath_common(file, line, __builtin_return_address(0), |
418 | TAINT_WARN, NULL); | ||
401 | } | 419 | } |
402 | EXPORT_SYMBOL(warn_slowpath_null); | 420 | EXPORT_SYMBOL(warn_slowpath_null); |
403 | #endif | 421 | #endif |