aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nubus
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2014-06-04 19:11:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:17 -0400
commita8fe19ebfbfd90ec17c02284717238b02efb9580 (patch)
treeb0bcae3df8f0f739993ede45c81c031d32d5edcd /drivers/nubus
parent84b5ec8a9df86f3dcaaaf912715db35e4852d1da (diff)
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 'drivers/nubus')
-rw-r--r--drivers/nubus/nubus.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c
index 43926cd25ae8..5066a7ef7b6c 100644
--- a/drivers/nubus/nubus.c
+++ b/drivers/nubus/nubus.c
@@ -473,7 +473,7 @@ static struct nubus_dev* __init
473 if (slot == 0 && (unsigned long)dir.base % 2) 473 if (slot == 0 && (unsigned long)dir.base % 2)
474 dir.base += 1; 474 dir.base += 1;
475 475
476 if (console_loglevel >= 10) 476 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
477 printk(KERN_DEBUG "nubus_get_functional_resource: parent is 0x%p, dir is 0x%p\n", 477 printk(KERN_DEBUG "nubus_get_functional_resource: parent is 0x%p, dir is 0x%p\n",
478 parent->base, dir.base); 478 parent->base, dir.base);
479 479
@@ -568,7 +568,7 @@ static int __init nubus_get_vidnames(struct nubus_board* board,
568 568
569 printk(KERN_INFO " video modes supported:\n"); 569 printk(KERN_INFO " video modes supported:\n");
570 nubus_get_subdir(parent, &dir); 570 nubus_get_subdir(parent, &dir);
571 if (console_loglevel >= 10) 571 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
572 printk(KERN_DEBUG "nubus_get_vidnames: parent is 0x%p, dir is 0x%p\n", 572 printk(KERN_DEBUG "nubus_get_vidnames: parent is 0x%p, dir is 0x%p\n",
573 parent->base, dir.base); 573 parent->base, dir.base);
574 574
@@ -629,7 +629,7 @@ static int __init nubus_get_vendorinfo(struct nubus_board* board,
629 629
630 printk(KERN_INFO " vendor info:\n"); 630 printk(KERN_INFO " vendor info:\n");
631 nubus_get_subdir(parent, &dir); 631 nubus_get_subdir(parent, &dir);
632 if (console_loglevel >= 10) 632 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
633 printk(KERN_DEBUG "nubus_get_vendorinfo: parent is 0x%p, dir is 0x%p\n", 633 printk(KERN_DEBUG "nubus_get_vendorinfo: parent is 0x%p, dir is 0x%p\n",
634 parent->base, dir.base); 634 parent->base, dir.base);
635 635
@@ -654,7 +654,7 @@ static int __init nubus_get_board_resource(struct nubus_board* board, int slot,
654 struct nubus_dirent ent; 654 struct nubus_dirent ent;
655 655
656 nubus_get_subdir(parent, &dir); 656 nubus_get_subdir(parent, &dir);
657 if (console_loglevel >= 10) 657 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
658 printk(KERN_DEBUG "nubus_get_board_resource: parent is 0x%p, dir is 0x%p\n", 658 printk(KERN_DEBUG "nubus_get_board_resource: parent is 0x%p, dir is 0x%p\n",
659 parent->base, dir.base); 659 parent->base, dir.base);
660 660
@@ -753,19 +753,19 @@ static void __init nubus_find_rom_dir(struct nubus_board* board)
753 if (nubus_readdir(&dir, &ent) == -1) 753 if (nubus_readdir(&dir, &ent) == -1)
754 goto badrom; 754 goto badrom;
755 755
756 if (console_loglevel >= 10) 756 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
757 printk(KERN_INFO "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data); 757 printk(KERN_INFO "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data);
758 /* This one takes us to where we want to go. */ 758 /* This one takes us to where we want to go. */
759 if (nubus_readdir(&dir, &ent) == -1) 759 if (nubus_readdir(&dir, &ent) == -1)
760 goto badrom; 760 goto badrom;
761 if (console_loglevel >= 10) 761 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
762 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data); 762 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data);
763 nubus_get_subdir(&ent, &dir); 763 nubus_get_subdir(&ent, &dir);
764 764
765 /* Resource ID 01, also an "Unknown Macintosh" */ 765 /* Resource ID 01, also an "Unknown Macintosh" */
766 if (nubus_readdir(&dir, &ent) == -1) 766 if (nubus_readdir(&dir, &ent) == -1)
767 goto badrom; 767 goto badrom;
768 if (console_loglevel >= 10) 768 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
769 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data); 769 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data);
770 770
771 /* FIXME: the first one is *not* always the right one. We 771 /* FIXME: the first one is *not* always the right one. We
@@ -780,7 +780,7 @@ static void __init nubus_find_rom_dir(struct nubus_board* board)
780 path to that address... */ 780 path to that address... */
781 if (nubus_readdir(&dir, &ent) == -1) 781 if (nubus_readdir(&dir, &ent) == -1)
782 goto badrom; 782 goto badrom;
783 if (console_loglevel >= 10) 783 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
784 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data); 784 printk(KERN_DEBUG "nubus_get_rom_dir: entry %02x %06x\n", ent.type, ent.data);
785 785
786 /* Bwahahahaha... */ 786 /* Bwahahahaha... */
@@ -816,7 +816,7 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes)
816 board->fblock = rp; 816 board->fblock = rp;
817 817
818 /* Dump the format block for debugging purposes */ 818 /* Dump the format block for debugging purposes */
819 if (console_loglevel >= 10) { 819 if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG) {
820 int i; 820 int i;
821 printk(KERN_DEBUG "Slot %X, format block at 0x%p\n", 821 printk(KERN_DEBUG "Slot %X, format block at 0x%p\n",
822 slot, rp); 822 slot, rp);