memblock: Add __memblock_dump_all()
authorTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:06 +0000 (10:22 -0800)
committerTejun Heo <tj@kernel.org>
Thu, 8 Dec 2011 18:22:06 +0000 (10:22 -0800)
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>
include/linux/memblock.h
mm/memblock.c

index 2f8e28f859b3c4154b576e94f438031794ea956c..1a3bee78590f95f55f05a0c00947faff3a229d64 100644 (file)
@@ -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
index d0506183c5b1a7e21060b33aecdbba14000c134d..4b80f6fae0918516bbae9be8cb057b13fc9be073 100644 (file)
@@ -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);