Commit 1b0f6681 authored by Olof Johansson's avatar Olof Johansson Committed by Russell King

ARM: 7911/2: Clean up setup printks a bit

Clean up the setup ARM printks a bit. Add printk level to a few
that were missing (CPU: <...> ones, in particular), and switch from
printk(KERN_* ..) to pr_*().

Finally, un-wrap some long lines since it makes it harder to grep the
sources from where an error came from and tweak some cases of indentation.
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 23c34527
...@@ -334,7 +334,7 @@ static void __init cacheid_init(void) ...@@ -334,7 +334,7 @@ static void __init cacheid_init(void)
cacheid = CACHEID_VIVT; cacheid = CACHEID_VIVT;
} }
printk("CPU: %s data cache, %s instruction cache\n", pr_info("CPU: %s data cache, %s instruction cache\n",
cache_is_vivt() ? "VIVT" : cache_is_vivt() ? "VIVT" :
cache_is_vipt_aliasing() ? "VIPT aliasing" : cache_is_vipt_aliasing() ? "VIPT aliasing" :
cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown",
...@@ -416,7 +416,7 @@ void notrace cpu_init(void) ...@@ -416,7 +416,7 @@ void notrace cpu_init(void)
struct stack *stk = &stacks[cpu]; struct stack *stk = &stacks[cpu];
if (cpu >= NR_CPUS) { if (cpu >= NR_CPUS) {
printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu); pr_crit("CPU%u: bad primary CPU number\n", cpu);
BUG(); BUG();
} }
...@@ -484,7 +484,7 @@ void __init smp_setup_processor_id(void) ...@@ -484,7 +484,7 @@ void __init smp_setup_processor_id(void)
*/ */
set_my_cpu_offset(0); set_my_cpu_offset(0);
printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr); pr_info("Booting Linux on physical CPU 0x%x\n", mpidr);
} }
struct mpidr_hash mpidr_hash; struct mpidr_hash mpidr_hash;
...@@ -564,8 +564,8 @@ static void __init setup_processor(void) ...@@ -564,8 +564,8 @@ static void __init setup_processor(void)
*/ */
list = lookup_processor_type(read_cpuid_id()); list = lookup_processor_type(read_cpuid_id());
if (!list) { if (!list) {
printk("CPU configuration botched (ID %08x), unable " pr_err("CPU configuration botched (ID %08x), unable to continue.\n",
"to continue.\n", read_cpuid_id()); read_cpuid_id());
while (1); while (1);
} }
...@@ -585,7 +585,7 @@ static void __init setup_processor(void) ...@@ -585,7 +585,7 @@ static void __init setup_processor(void)
cpu_cache = *list->cache; cpu_cache = *list->cache;
#endif #endif
printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", pr_info("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
cpu_name, read_cpuid_id(), read_cpuid_id() & 15, cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
proc_arch[cpu_architecture()], cr_alignment); proc_arch[cpu_architecture()], cr_alignment);
...@@ -629,8 +629,8 @@ int __init arm_add_memory(u64 start, u64 size) ...@@ -629,8 +629,8 @@ int __init arm_add_memory(u64 start, u64 size)
u64 aligned_start; u64 aligned_start;
if (meminfo.nr_banks >= NR_BANKS) { if (meminfo.nr_banks >= NR_BANKS) {
printk(KERN_CRIT "NR_BANKS too low, " pr_crit("NR_BANKS too low, ignoring memory at 0x%08llx\n",
"ignoring memory at 0x%08llx\n", (long long)start); (long long)start);
return -EINVAL; return -EINVAL;
} }
...@@ -643,14 +643,14 @@ int __init arm_add_memory(u64 start, u64 size) ...@@ -643,14 +643,14 @@ int __init arm_add_memory(u64 start, u64 size)
#ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT
if (aligned_start > ULONG_MAX) { if (aligned_start > ULONG_MAX) {
printk(KERN_CRIT "Ignoring memory at 0x%08llx outside " pr_crit("Ignoring memory at 0x%08llx outside 32-bit physical address space\n",
"32-bit physical address space\n", (long long)start); (long long)start);
return -EINVAL; return -EINVAL;
} }
if (aligned_start + size > ULONG_MAX) { if (aligned_start + size > ULONG_MAX) {
printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in " pr_crit("Truncating memory at 0x%08llx to fit in 32-bit physical address space\n",
"32-bit physical address space\n", (long long)start); (long long)start);
/* /*
* To ensure bank->start + bank->size is representable in * To ensure bank->start + bank->size is representable in
* 32 bits, we use ULONG_MAX as the upper limit rather than 4GB. * 32 bits, we use ULONG_MAX as the upper limit rather than 4GB.
...@@ -819,13 +819,12 @@ static void __init reserve_crashkernel(void) ...@@ -819,13 +819,12 @@ static void __init reserve_crashkernel(void)
ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE); ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE);
if (ret < 0) { if (ret < 0) {
printk(KERN_WARNING "crashkernel reservation failed - " pr_warn("crashkernel reservation failed - memory is in use (0x%lx)\n",
"memory is in use (0x%lx)\n", (unsigned long)crash_base); (unsigned long)crash_base);
return; return;
} }
printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " pr_info("Reserving %ldMB of memory at %ldMB for crashkernel (System RAM: %ldMB)\n",
"for crashkernel (System RAM: %ldMB)\n",
(unsigned long)(crash_size >> 20), (unsigned long)(crash_size >> 20),
(unsigned long)(crash_base >> 20), (unsigned long)(crash_base >> 20),
(unsigned long)(total_mem >> 20)); (unsigned long)(total_mem >> 20));
......
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