summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-03-23 00:26:46 +0100
committerMax Filippov <jcmvbkbc@gmail.com>2014-04-01 23:35:55 +0200
commit8585b316bbed9339412d267c1fd8839dd059d69f (patch)
tree2d879b9b44170842d63d8f1455d56d16597184c3 /arch
parentxtensa: handle memmap kernel option (diff)
downloadlinux-8585b316bbed9339412d267c1fd8839dd059d69f.tar.xz
linux-8585b316bbed9339412d267c1fd8839dd059d69f.zip
xtensa: dump sysmem from the bootmem_init
Debug dump of physical memory configuration. Useful for inspection of resulting memory map, esp. in the presence of memmap= kernel option. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/xtensa/mm/init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index d70ba9333f44..03bd025307e3 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -32,6 +32,17 @@
struct sysmem_info sysmem __initdata;
+static void __init sysmem_dump(void)
+{
+ unsigned i;
+
+ pr_debug("Sysmem:\n");
+ for (i = 0; i < sysmem.nr_banks; ++i)
+ pr_debug(" 0x%08lx - 0x%08lx (%ldK)\n",
+ sysmem.bank[i].start, sysmem.bank[i].end,
+ (sysmem.bank[i].end - sysmem.bank[i].start) >> 10);
+}
+
/*
* Find bank with maximal .start such that bank.start <= start
*/
@@ -227,6 +238,7 @@ void __init bootmem_init(void)
unsigned long bootmap_start, bootmap_size;
int i;
+ sysmem_dump();
max_low_pfn = max_pfn = 0;
min_low_pfn = ~0;