summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>2016-12-27 09:16:05 -0500
committerPetr Mladek <pmladek@suse.com>2017-02-08 05:02:33 -0500
commitf92bac3b141b8233e34ddf32d227e12bfba07b48 (patch)
tree6f59d9dacd2b4eaf944e173aee136a6868389ff5 /init
parentbd66a89249892acc9d938ba4956066b21403fa5f (diff)
printk: rename nmi.c and exported api
A preparation patch for printk_safe work. No functional change. - rename nmi.c to print_safe.c - add `printk_safe' prefix to some (which used both by printk-safe and printk-nmi) of the exported functions. Link: http://lkml.kernel.org/r/20161227141611.940-3-sergey.senozhatsky@gmail.com Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Jan Kara <jack@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: Calvin Owens <calvinowens@fb.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig16
-rw-r--r--init/main.c2
2 files changed, 10 insertions, 8 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 223b734abccd..760b7d0bc9d7 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -875,17 +875,19 @@ config LOG_CPU_MAX_BUF_SHIFT
875 13 => 8 KB for each CPU 875 13 => 8 KB for each CPU
876 12 => 4 KB for each CPU 876 12 => 4 KB for each CPU
877 877
878config NMI_LOG_BUF_SHIFT 878config PRINTK_SAFE_LOG_BUF_SHIFT
879 int "Temporary per-CPU NMI log buffer size (12 => 4KB, 13 => 8KB)" 879 int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)"
880 range 10 21 880 range 10 21
881 default 13 881 default 13
882 depends on PRINTK_NMI 882 depends on PRINTK
883 help 883 help
884 Select the size of a per-CPU buffer where NMI messages are temporary 884 Select the size of an alternate printk per-CPU buffer where messages
885 stored. They are copied to the main log buffer in a safe context 885 printed from usafe contexts are temporary stored. One example would
886 to avoid a deadlock. The value defines the size as a power of 2. 886 be NMI messages, another one - printk recursion. The messages are
887 copied to the main log buffer in a safe context to avoid a deadlock.
888 The value defines the size as a power of 2.
887 889
888 NMI messages are rare and limited. The largest one is when 890 Those messages are rare and limited. The largest one is when
889 a backtrace is printed. It usually fits into 4KB. Select 891 a backtrace is printed. It usually fits into 4KB. Select
890 8KB if you want to be on the safe side. 892 8KB if you want to be on the safe side.
891 893
diff --git a/init/main.c b/init/main.c
index b0c9d6facef9..b4ca17d9bdeb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -580,7 +580,7 @@ asmlinkage __visible void __init start_kernel(void)
580 timekeeping_init(); 580 timekeeping_init();
581 time_init(); 581 time_init();
582 sched_clock_postinit(); 582 sched_clock_postinit();
583 printk_nmi_init(); 583 printk_safe_init();
584 perf_event_init(); 584 perf_event_init();
585 profile_init(); 585 profile_init();
586 call_function_init(); 586 call_function_init();