remarkable-linux/kernel/printk
Steven Rostedt (Red Hat) afdc34a3d3 printk: Add per_cpu printk func to allow printk to be diverted
Being able to divert printk to call another function besides the normal
logging is useful for such things like NMI handling. If some functions
are to be called from NMI that does printk() it is possible to lock up
the box if the nmi handler triggers when another printk is happening.

One example of this use is to perform a stack trace on all CPUs via NMI.
But if the NMI is to do the printk() it can cause the system to lock up.
By allowing the printk to be diverted to another function that can safely
record the printk output and then print it when it in a safe context
then NMIs will be safe to call these functions like show_regs().

Link: http://lkml.kernel.org/p/20140619213952.209176403@goodmis.org

Tested-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-19 22:01:21 -05:00
..
braille.c printk: Fix return of braille_register_console() 2013-08-06 13:18:12 -07:00
braille.h printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
console_cmdline.h
Makefile printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
printk.c printk: Add per_cpu printk func to allow printk to be diverted 2014-11-19 22:01:21 -05:00