diff options
author | Mark Rutland <mark.rutland@arm.com> | 2016-10-20 07:24:53 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-10-20 10:27:56 -0400 |
commit | f7881bd644474a4a62d7bd1ec801176f635f59ae (patch) | |
tree | 33a619f6654dc16b0287a5b30324b8d89afeaf22 | |
parent | db4b0710fae90a4407bfa77b23db396e580b9e23 (diff) |
arm64: remove pr_cont abuse from mem_init
All the lines printed by mem_init are independent, with each ending with
a newline. While they logically form a large block, none are actually
continuations of previous lines.
The kernel-side printk code and the userspace demsg tool differ in their
handling of KERN_CONT following a newline, and while this isn't always a
problem kernel-side, it does cause difficulty for userspace. Using
pr_cont causes the userspace tool to not print line prefix (e.g.
timestamps) even when following a newline, mis-aligning the output and
making it harder to read, e.g.
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB)
vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB)
.text : 0xffff000008080000 - 0xffff0000088b0000 ( 8384 KB)
.rodata : 0xffff0000088b0000 - 0xffff000008c50000 ( 3712 KB)
.init : 0xffff000008c50000 - 0xffff000008d50000 ( 1024 KB)
.data : 0xffff000008d50000 - 0xffff000008e25200 ( 853 KB)
.bss : 0xffff000008e25200 - 0xffff000008e6bec0 ( 284 KB)
fixed : 0xffff7dfffe7fd000 - 0xffff7dfffec00000 ( 4108 KB)
PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB)
vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum)
0xffff7e0000000000 - 0xffff7e0026000000 ( 608 MB actual)
memory : 0xffff800000000000 - 0xffff800980000000 ( 38912 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
Fix this by using pr_notice consistently for all lines, which both the
kernel and userspace are happy with.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/mm/init.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 21c489bdeb4e..212c4d1e2f26 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -421,35 +421,35 @@ void __init mem_init(void) | |||
421 | 421 | ||
422 | pr_notice("Virtual kernel memory layout:\n"); | 422 | pr_notice("Virtual kernel memory layout:\n"); |
423 | #ifdef CONFIG_KASAN | 423 | #ifdef CONFIG_KASAN |
424 | pr_cont(" kasan : 0x%16lx - 0x%16lx (%6ld GB)\n", | 424 | pr_notice(" kasan : 0x%16lx - 0x%16lx (%6ld GB)\n", |
425 | MLG(KASAN_SHADOW_START, KASAN_SHADOW_END)); | 425 | MLG(KASAN_SHADOW_START, KASAN_SHADOW_END)); |
426 | #endif | 426 | #endif |
427 | pr_cont(" modules : 0x%16lx - 0x%16lx (%6ld MB)\n", | 427 | pr_notice(" modules : 0x%16lx - 0x%16lx (%6ld MB)\n", |
428 | MLM(MODULES_VADDR, MODULES_END)); | 428 | MLM(MODULES_VADDR, MODULES_END)); |
429 | pr_cont(" vmalloc : 0x%16lx - 0x%16lx (%6ld GB)\n", | 429 | pr_notice(" vmalloc : 0x%16lx - 0x%16lx (%6ld GB)\n", |
430 | MLG(VMALLOC_START, VMALLOC_END)); | 430 | MLG(VMALLOC_START, VMALLOC_END)); |
431 | pr_cont(" .text : 0x%p" " - 0x%p" " (%6ld KB)\n", | 431 | pr_notice(" .text : 0x%p" " - 0x%p" " (%6ld KB)\n", |
432 | MLK_ROUNDUP(_text, _etext)); | 432 | MLK_ROUNDUP(_text, _etext)); |
433 | pr_cont(" .rodata : 0x%p" " - 0x%p" " (%6ld KB)\n", | 433 | pr_notice(" .rodata : 0x%p" " - 0x%p" " (%6ld KB)\n", |
434 | MLK_ROUNDUP(__start_rodata, __init_begin)); | 434 | MLK_ROUNDUP(__start_rodata, __init_begin)); |
435 | pr_cont(" .init : 0x%p" " - 0x%p" " (%6ld KB)\n", | 435 | pr_notice(" .init : 0x%p" " - 0x%p" " (%6ld KB)\n", |
436 | MLK_ROUNDUP(__init_begin, __init_end)); | 436 | MLK_ROUNDUP(__init_begin, __init_end)); |
437 | pr_cont(" .data : 0x%p" " - 0x%p" " (%6ld KB)\n", | 437 | pr_notice(" .data : 0x%p" " - 0x%p" " (%6ld KB)\n", |
438 | MLK_ROUNDUP(_sdata, _edata)); | 438 | MLK_ROUNDUP(_sdata, _edata)); |
439 | pr_cont(" .bss : 0x%p" " - 0x%p" " (%6ld KB)\n", | 439 | pr_notice(" .bss : 0x%p" " - 0x%p" " (%6ld KB)\n", |
440 | MLK_ROUNDUP(__bss_start, __bss_stop)); | 440 | MLK_ROUNDUP(__bss_start, __bss_stop)); |
441 | pr_cont(" fixed : 0x%16lx - 0x%16lx (%6ld KB)\n", | 441 | pr_notice(" fixed : 0x%16lx - 0x%16lx (%6ld KB)\n", |
442 | MLK(FIXADDR_START, FIXADDR_TOP)); | 442 | MLK(FIXADDR_START, FIXADDR_TOP)); |
443 | pr_cont(" PCI I/O : 0x%16lx - 0x%16lx (%6ld MB)\n", | 443 | pr_notice(" PCI I/O : 0x%16lx - 0x%16lx (%6ld MB)\n", |
444 | MLM(PCI_IO_START, PCI_IO_END)); | 444 | MLM(PCI_IO_START, PCI_IO_END)); |
445 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | 445 | #ifdef CONFIG_SPARSEMEM_VMEMMAP |
446 | pr_cont(" vmemmap : 0x%16lx - 0x%16lx (%6ld GB maximum)\n", | 446 | pr_notice(" vmemmap : 0x%16lx - 0x%16lx (%6ld GB maximum)\n", |
447 | MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE)); | 447 | MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE)); |
448 | pr_cont(" 0x%16lx - 0x%16lx (%6ld MB actual)\n", | 448 | pr_notice(" 0x%16lx - 0x%16lx (%6ld MB actual)\n", |
449 | MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()), | 449 | MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()), |
450 | (unsigned long)virt_to_page(high_memory))); | 450 | (unsigned long)virt_to_page(high_memory))); |
451 | #endif | 451 | #endif |
452 | pr_cont(" memory : 0x%16lx - 0x%16lx (%6ld MB)\n", | 452 | pr_notice(" memory : 0x%16lx - 0x%16lx (%6ld MB)\n", |
453 | MLM(__phys_to_virt(memblock_start_of_DRAM()), | 453 | MLM(__phys_to_virt(memblock_start_of_DRAM()), |
454 | (unsigned long)high_memory)); | 454 | (unsigned long)high_memory)); |
455 | 455 | ||