summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2014-06-04 16:11:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 16:54:17 -0700
commita8fe19ebfbfd90ec17c02284717238b02efb9580 (patch)
treeb0bcae3df8f0f739993ede45c81c031d32d5edcd /arch/x86
parent84b5ec8a9df86f3dcaaaf912715db35e4852d1da (diff)
downloadop-kernel-dev-a8fe19ebfbfd90ec17c02284717238b02efb9580.zip
op-kernel-dev-a8fe19ebfbfd90ec17c02284717238b02efb9580.tar.gz
kernel/printk: use symbolic defines for console loglevels
... instead of naked numbers. Stuff in sysrq.c used to set it to 8 which is supposed to mean above default level so set it to DEBUG instead as we're terminating/killing all tasks and we want to be verbose there. Also, correct the check in x86_64_start_kernel which should be >= as we're clearly issuing the string there for all debug levels, not only the magical 10. Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: Joe Perches <joe@perches.com> Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/platform/uv/uv_nmi.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 068054f..eda1a86 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -172,7 +172,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
*/
load_ucode_bsp();
- if (console_loglevel == 10)
+ if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
early_printk("Kernel alive\n");
clear_page(init_level4_pgt);
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index be27da6..c89c933 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -85,7 +85,7 @@ static cpumask_var_t uv_nmi_cpu_mask;
* Default is all stack dumps go to the console and buffer.
* Lower level to send to log buffer only.
*/
-static int uv_nmi_loglevel = 7;
+static int uv_nmi_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
module_param_named(dump_loglevel, uv_nmi_loglevel, int, 0644);
/*
OpenPOWER on IntegriCloud