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-02-08 14:01:18 +0100
commit9b4d47c91aed33d108e20a645c76ac6ffc78d50f (patch)
tree1869d0fe2cb26a8e134df1a45414ed53d0e2adb3
parent855c730e40778d6d2f7526f312a8af7392b756c8 (diff)
downloadlinux-integrator-9b4d47c91aed33d108e20a645c76ac6ffc78d50f.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