History

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.

Borislav Petkov committed 12 years ago

Commit a8fe19e1 parent 84b5ec810 files · +36 −32Browse files

Showing the changes to kernel/debug (3 of 10 files). Show all

Unified · Split

3 files
  1. kernel/debug/kdb/kdb_bt.c +1 −1
  2. kernel/debug/kdb/kdb_io.c +1 −1
  3. kernel/debug/kdb/kdb_main.c +1 −1
kernel/debug/kdb/kdb_bt.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21static void kdb_show_stack(struct task_struct *p, void *addr)21static void kdb_show_stack(struct task_struct *p, void *addr)
22{22{
23 int old_lvl = console_loglevel;23 int old_lvl = console_loglevel;
24 console_loglevel = 15;24 console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
25 kdb_trap_printk++;25 kdb_trap_printk++;
26 kdb_set_current_task(p);26 kdb_set_current_task(p);
27 if (addr) {27 if (addr) {
kernel/debug/kdb/kdb_io.c+1−1
@@ -710,7 +710,7 @@ kdb_printit: · 709 unmodified lines
710 }710 }
711 if (logging) {711 if (logging) {
712 saved_loglevel = console_loglevel;712 saved_loglevel = console_loglevel;
713 console_loglevel = 0;713 console_loglevel = CONSOLE_LOGLEVEL_SILENT;
714 printk(KERN_INFO "%s", kdb_buffer);714 printk(KERN_INFO "%s", kdb_buffer);
715 }715 }
716 716
kernel/debug/kdb/kdb_main.c+1−1
@@ -1091,7 +1091,7 @@ static int kdb_reboot(int argc, const char **argv) · 1090 unmodified lines
1091static void kdb_dumpregs(struct pt_regs *regs)1091static void kdb_dumpregs(struct pt_regs *regs)
1092{1092{
1093 int old_lvl = console_loglevel;1093 int old_lvl = console_loglevel;
1094 console_loglevel = 15;1094 console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
1095 kdb_trap_printk++;1095 kdb_trap_printk++;
1096 show_regs(regs);1096 show_regs(regs);
1097 kdb_trap_printk--;1097 kdb_trap_printk--;