diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2021-02-04 09:34:35 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2021-05-17 15:07:47 +0200 |
| commit | e6cd53886e36cf1bef7e3a060a61805d156dabc9 (patch) | |
| tree | d391741f6c874ea6e4413a12bacd7136b9d431f4 | |
| parent | 5d84d4ddf38faabfb934f85763f152922367ea64 (diff) | |
| download | linux-integrator-e6cd53886e36cf1bef7e3a060a61805d156dabc9.tar.gz | |
ARM: Print virtual memory info again
This is a reimplementation of the debug prints lost due
to commit 1c31d4e96b8c205fe3aa8e73e930a0ccbf4b9a2b
"ARM: 8820/1: mm: Stop printing the virtual memory layout"
This information is really good when you try to actually
work with the virtual memory allocations.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | arch/arm/mm/init.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 9d4744a632c60..25ccf0541a6c9 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -293,6 +293,28 @@ static void __init free_highpages(void) #endif } +void __init mem_init_print_arm_info(void) +{ +#define MLM(b, t) b, t, ((t) - (b)) >> 20 + pr_notice("Virtual kernel memory layout:\n" + " fixmap : 0x%08lx - 0x%08lx (%4ld MB)\n" + " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n" + " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n" +#ifdef CONFIG_MODULES + " modules : 0x%08lx - 0x%08lx (%4ld MB)\n", +#endif + " kernel : 0x%08lx - 0x%08lx (%4ld MB)\n", + MLM(FIXADDR_START, FIXADDR_END), + MLM(VMALLOC_START, VMALLOC_END), + MLM(PAGE_OFFSET, (unsigned long)high_memory), +#ifdef CONFIG_MODULES + MLM(MODULES_VADDR, MODULES_END), +#endif + /* From beginning of .text to end of .bss */ + MLM((unsigned long)_text, (unsigned long)__bss_stop)); +#undef MLM +} + /* * mem_init() marks the free areas in the mem_map and tells us how much * memory is free. This is done after various parts of the system have @@ -320,6 +342,9 @@ void __init mem_init(void) free_highpages(); + mem_init_print_info(); + mem_init_print_arm_info(); + /* * Check boundaries twice: Some fundamental inconsistencies can * be detected at build time already. |
