diff options
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 27 | 
1 files changed, 23 insertions, 4 deletions
| diff --git a/kernel/panic.c b/kernel/panic.c index 13d966b4c14a..3b16cd93fa7d 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -87,6 +87,7 @@ NORET_TYPE void panic(const char * fmt, ...)  	 */  	preempt_disable(); +	console_verbose();  	bust_spinlocks(1);  	va_start(args, fmt);  	vsnprintf(buf, sizeof(buf), fmt, args); @@ -178,6 +179,7 @@ static const struct tnt tnts[] = {  	{ TAINT_OVERRIDDEN_ACPI_TABLE,	'A', ' ' },  	{ TAINT_WARN,			'W', ' ' },  	{ TAINT_CRAP,			'C', ' ' }, +	{ TAINT_FIRMWARE_WORKAROUND,	'I', ' ' },  };  /** @@ -194,6 +196,7 @@ static const struct tnt tnts[] = {   *  'A' - ACPI table overridden.   *  'W' - Taint on warning.   *  'C' - modules from drivers/staging are loaded. + *  'I' - Working around severe firmware bug.   *   *	The string is overwritten by the next call to print_tainted().   */ @@ -365,7 +368,8 @@ struct slowpath_args {  	va_list args;  }; -static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args) +static void warn_slowpath_common(const char *file, int line, void *caller, +				 unsigned taint, struct slowpath_args *args)  {  	const char *board; @@ -381,7 +385,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller, struc  	print_modules();  	dump_stack();  	print_oops_end_marker(); -	add_taint(TAINT_WARN); +	add_taint(taint);  }  void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) @@ -390,14 +394,29 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)  	args.fmt = fmt;  	va_start(args.args, fmt); -	warn_slowpath_common(file, line, __builtin_return_address(0), &args); +	warn_slowpath_common(file, line, __builtin_return_address(0), +			     TAINT_WARN, &args);  	va_end(args.args);  }  EXPORT_SYMBOL(warn_slowpath_fmt); +void warn_slowpath_fmt_taint(const char *file, int line, +			     unsigned taint, const char *fmt, ...) +{ +	struct slowpath_args args; + +	args.fmt = fmt; +	va_start(args.args, fmt); +	warn_slowpath_common(file, line, __builtin_return_address(0), +			     taint, &args); +	va_end(args.args); +} +EXPORT_SYMBOL(warn_slowpath_fmt_taint); +  void warn_slowpath_null(const char *file, int line)  { -	warn_slowpath_common(file, line, __builtin_return_address(0), NULL); +	warn_slowpath_common(file, line, __builtin_return_address(0), +			     TAINT_WARN, NULL);  }  EXPORT_SYMBOL(warn_slowpath_null);  #endif | 
