aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-12-08 10:22:06 -0800
committerTejun Heo <tj@kernel.org>2011-12-08 10:22:06 -0800
commit4ff7b82f1e5fc65a7c9512b231b4ea533f28541a (patch)
tree7251ce5a178add8bacd072d34d232c23c07dd389
parentmemblock: Use memblock_reserve() in memblock internal functions (diff)
downloadlinux-dev-4ff7b82f1e5fc65a7c9512b231b4ea533f28541a.tar.xz
linux-dev-4ff7b82f1e5fc65a7c9512b231b4ea533f28541a.zip
memblock: Add __memblock_dump_all()
Add __memblock_dump_all() which dumps memblock configuration whether memblock_debug is enabled or not. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Yinghai Lu <yinghai@kernel.org>
-rw-r--r--include/linux/memblock.h8
-rw-r--r--mm/memblock.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 2f8e28f859b3..1a3bee78590f 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -129,7 +129,13 @@ int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
int memblock_is_reserved(phys_addr_t addr);
int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
-void memblock_dump_all(void);
+extern void __memblock_dump_all(void);
+
+static inline void memblock_dump_all(void)
+{
+ if (memblock_debug)
+ __memblock_dump_all();
+}
/**
* memblock_set_current_limit - Set the current allocation limit to allow
diff --git a/mm/memblock.c b/mm/memblock.c
index d0506183c5b1..4b80f6fae091 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -898,11 +898,8 @@ static void __init_memblock memblock_dump(struct memblock_type *type, char *name
}
}
-void __init_memblock memblock_dump_all(void)
+void __init_memblock __memblock_dump_all(void)
{
- if (!memblock_debug)
- return;
-
pr_info("MEMBLOCK configuration:\n");
pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size);