Commit a64ae7a2 authored by Mike Crowe's avatar Mike Crowe Committed by Ralf Baechle

[MIPS] Convert printk statements during kernel setup to use severity levels

Signed-off-by: default avatarMike Crowe <mac@mcrowe.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent b8e6c91c
...@@ -78,7 +78,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type) ...@@ -78,7 +78,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
/* Sanity check */ /* Sanity check */
if (start + size < start) { if (start + size < start) {
printk("Trying to add an invalid memory region, skipped\n"); pr_warning("Trying to add an invalid memory region, skipped\n");
return; return;
} }
...@@ -92,7 +92,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type) ...@@ -92,7 +92,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
} }
if (x == BOOT_MEM_MAP_MAX) { if (x == BOOT_MEM_MAP_MAX) {
printk("Ooops! Too many entries in the memory map!\n"); pr_err("Ooops! Too many entries in the memory map!\n");
return; return;
} }
...@@ -108,22 +108,22 @@ static void __init print_memory_map(void) ...@@ -108,22 +108,22 @@ static void __init print_memory_map(void)
const int field = 2 * sizeof(unsigned long); const int field = 2 * sizeof(unsigned long);
for (i = 0; i < boot_mem_map.nr_map; i++) { for (i = 0; i < boot_mem_map.nr_map; i++) {
printk(" memory: %0*Lx @ %0*Lx ", printk(KERN_INFO " memory: %0*Lx @ %0*Lx ",
field, (unsigned long long) boot_mem_map.map[i].size, field, (unsigned long long) boot_mem_map.map[i].size,
field, (unsigned long long) boot_mem_map.map[i].addr); field, (unsigned long long) boot_mem_map.map[i].addr);
switch (boot_mem_map.map[i].type) { switch (boot_mem_map.map[i].type) {
case BOOT_MEM_RAM: case BOOT_MEM_RAM:
printk("(usable)\n"); printk(KERN_CONT "(usable)\n");
break; break;
case BOOT_MEM_ROM_DATA: case BOOT_MEM_ROM_DATA:
printk("(ROM data)\n"); printk(KERN_CONT "(ROM data)\n");
break; break;
case BOOT_MEM_RESERVED: case BOOT_MEM_RESERVED:
printk("(reserved)\n"); printk(KERN_CONT "(reserved)\n");
break; break;
default: default:
printk("type %lu\n", boot_mem_map.map[i].type); printk(KERN_CONT "type %lu\n", boot_mem_map.map[i].type);
break; break;
} }
} }
...@@ -185,11 +185,11 @@ static unsigned long __init init_initrd(void) ...@@ -185,11 +185,11 @@ static unsigned long __init init_initrd(void)
sanitize: sanitize:
if (initrd_start & ~PAGE_MASK) { if (initrd_start & ~PAGE_MASK) {
printk(KERN_ERR "initrd start must be page aligned\n"); pr_err("initrd start must be page aligned\n");
goto disable; goto disable;
} }
if (initrd_start < PAGE_OFFSET) { if (initrd_start < PAGE_OFFSET) {
printk(KERN_ERR "initrd start < PAGE_OFFSET\n"); pr_err("initrd start < PAGE_OFFSET\n");
goto disable; goto disable;
} }
...@@ -221,18 +221,18 @@ static void __init finalize_initrd(void) ...@@ -221,18 +221,18 @@ static void __init finalize_initrd(void)
goto disable; goto disable;
} }
if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) { if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
printk("Initrd extends beyond end of memory"); printk(KERN_ERR "Initrd extends beyond end of memory");
goto disable; goto disable;
} }
reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT); reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT);
initrd_below_start_ok = 1; initrd_below_start_ok = 1;
printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n", pr_info("Initial ramdisk at: 0x%lx (%lu bytes)\n",
initrd_start, size); initrd_start, size);
return; return;
disable: disable:
printk(" - disabling initrd\n"); printk(KERN_CONT " - disabling initrd\n");
initrd_start = 0; initrd_start = 0;
initrd_end = 0; initrd_end = 0;
} }
...@@ -310,14 +310,12 @@ static void __init bootmem_init(void) ...@@ -310,14 +310,12 @@ static void __init bootmem_init(void)
if (min_low_pfn >= max_low_pfn) if (min_low_pfn >= max_low_pfn)
panic("Incorrect memory mapping !!!"); panic("Incorrect memory mapping !!!");
if (min_low_pfn > ARCH_PFN_OFFSET) { if (min_low_pfn > ARCH_PFN_OFFSET) {
printk(KERN_INFO pr_info("Wasting %lu bytes for tracking %lu unused pages\n",
"Wasting %lu bytes for tracking %lu unused pages\n", (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
(min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page), min_low_pfn - ARCH_PFN_OFFSET);
min_low_pfn - ARCH_PFN_OFFSET);
} else if (min_low_pfn < ARCH_PFN_OFFSET) { } else if (min_low_pfn < ARCH_PFN_OFFSET) {
printk(KERN_INFO pr_info("%lu free pages won't be used\n",
"%lu free pages won't be used\n", ARCH_PFN_OFFSET - min_low_pfn);
ARCH_PFN_OFFSET - min_low_pfn);
} }
min_low_pfn = ARCH_PFN_OFFSET; min_low_pfn = ARCH_PFN_OFFSET;
...@@ -471,7 +469,7 @@ static void __init arch_mem_init(char **cmdline_p) ...@@ -471,7 +469,7 @@ static void __init arch_mem_init(char **cmdline_p)
/* call board setup routine */ /* call board setup routine */
plat_mem_setup(); plat_mem_setup();
printk("Determined physical RAM map:\n"); pr_info("Determined physical RAM map:\n");
print_memory_map(); print_memory_map();
strlcpy(command_line, arcs_cmdline, sizeof(command_line)); strlcpy(command_line, arcs_cmdline, sizeof(command_line));
...@@ -482,7 +480,7 @@ static void __init arch_mem_init(char **cmdline_p) ...@@ -482,7 +480,7 @@ static void __init arch_mem_init(char **cmdline_p)
parse_early_param(); parse_early_param();
if (usermem) { if (usermem) {
printk("User-defined physical RAM map:\n"); pr_info("User-defined physical RAM map:\n");
print_memory_map(); print_memory_map();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment