aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-02-04 09:34:35 +0100
committerLinus Walleij <linus.walleij@linaro.org>2021-04-12 01:50:25 +0200
commit678cdec93763be3599aab4ded32b5d719f2e1942 (patch)
tree60e0a4fbb1e871789a4ac3eed66b728e59f91c99
parent7112835e8feddcdee65d3f6719efd2585363a952 (diff)
downloadlinux-integrator-678cdec93763be3599aab4ded32b5d719f2e1942.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.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 828a2561b2295..31381c2844c42 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
@@ -317,6 +339,7 @@ void __init mem_init(void)
free_highpages();
mem_init_print_info(NULL);
+ mem_init_print_arm_info();
/*
* Check boundaries twice: Some fundamental inconsistencies can