Skip to content

Commit 071929d

Browse files
labbottctmarinas
authored andcommitted
arm64: Stop printing the virtual memory layout
Printing kernel addresses should be done in limited circumstances, mostly for debugging purposes. Printing out the virtual memory layout at every kernel bootup doesn't really fall into this category so delete the prints. There are other ways to get the same information. Acked-by: Kees Cook <[email protected]> Signed-off-by: Laura Abbott <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 2f7aacf commit 071929d

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

arch/arm64/mm/init.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -599,49 +599,6 @@ void __init mem_init(void)
599599

600600
mem_init_print_info(NULL);
601601

602-
#define MLK(b, t) b, t, ((t) - (b)) >> 10
603-
#define MLM(b, t) b, t, ((t) - (b)) >> 20
604-
#define MLG(b, t) b, t, ((t) - (b)) >> 30
605-
#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K)
606-
607-
pr_notice("Virtual kernel memory layout:\n");
608-
#ifdef CONFIG_KASAN
609-
pr_notice(" kasan : 0x%16lx - 0x%16lx (%6ld GB)\n",
610-
MLG(KASAN_SHADOW_START, KASAN_SHADOW_END));
611-
#endif
612-
pr_notice(" modules : 0x%16lx - 0x%16lx (%6ld MB)\n",
613-
MLM(MODULES_VADDR, MODULES_END));
614-
pr_notice(" vmalloc : 0x%16lx - 0x%16lx (%6ld GB)\n",
615-
MLG(VMALLOC_START, VMALLOC_END));
616-
pr_notice(" .text : 0x%p" " - 0x%p" " (%6ld KB)\n",
617-
MLK_ROUNDUP(_text, _etext));
618-
pr_notice(" .rodata : 0x%p" " - 0x%p" " (%6ld KB)\n",
619-
MLK_ROUNDUP(__start_rodata, __init_begin));
620-
pr_notice(" .init : 0x%p" " - 0x%p" " (%6ld KB)\n",
621-
MLK_ROUNDUP(__init_begin, __init_end));
622-
pr_notice(" .data : 0x%p" " - 0x%p" " (%6ld KB)\n",
623-
MLK_ROUNDUP(_sdata, _edata));
624-
pr_notice(" .bss : 0x%p" " - 0x%p" " (%6ld KB)\n",
625-
MLK_ROUNDUP(__bss_start, __bss_stop));
626-
pr_notice(" fixed : 0x%16lx - 0x%16lx (%6ld KB)\n",
627-
MLK(FIXADDR_START, FIXADDR_TOP));
628-
pr_notice(" PCI I/O : 0x%16lx - 0x%16lx (%6ld MB)\n",
629-
MLM(PCI_IO_START, PCI_IO_END));
630-
#ifdef CONFIG_SPARSEMEM_VMEMMAP
631-
pr_notice(" vmemmap : 0x%16lx - 0x%16lx (%6ld GB maximum)\n",
632-
MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE));
633-
pr_notice(" 0x%16lx - 0x%16lx (%6ld MB actual)\n",
634-
MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()),
635-
(unsigned long)virt_to_page(high_memory)));
636-
#endif
637-
pr_notice(" memory : 0x%16lx - 0x%16lx (%6ld MB)\n",
638-
MLM(__phys_to_virt(memblock_start_of_DRAM()),
639-
(unsigned long)high_memory));
640-
641-
#undef MLK
642-
#undef MLM
643-
#undef MLK_ROUNDUP
644-
645602
/*
646603
* Check boundaries twice: Some fundamental inconsistencies can be
647604
* detected at build time already.

0 commit comments

Comments
 (0)