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
2121 static void kdb_show_stack(struct task_struct *p, void *addr)
2222 {
2323 int old_lvl = console_loglevel;
24− console_loglevel = 15;
24+ console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
2525 kdb_trap_printk++;
2626 kdb_set_current_task(p);
2727 if (addr) {
kernel/debug/kdb/kdb_io.c+1−1
@@ -710,7 +710,7 @@ kdb_printit: · 709 unmodified lines
710710 }
711711 if (logging) {
712712 saved_loglevel = console_loglevel;
713− console_loglevel = 0;
713+ console_loglevel = CONSOLE_LOGLEVEL_SILENT;
714714 printk(KERN_INFO "%s", kdb_buffer);
715715 }
716716
kernel/debug/kdb/kdb_main.c+1−1
@@ -1091,7 +1091,7 @@ static int kdb_reboot(int argc, const char **argv) · 1090 unmodified lines
10911091 static void kdb_dumpregs(struct pt_regs *regs)
10921092 {
10931093 int old_lvl = console_loglevel;
1094− console_loglevel = 15;
1094+ console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
10951095 kdb_trap_printk++;
10961096 show_regs(regs);
10971097 kdb_trap_printk--;