Commit 4ff7b82f authored by Tejun Heo's avatar Tejun Heo

memblock: Add __memblock_dump_all()

Add __memblock_dump_all() which dumps memblock configuration whether
memblock_debug is enabled or not.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
parent 9c8c27e2
...@@ -129,7 +129,13 @@ int memblock_is_region_memory(phys_addr_t base, phys_addr_t size); ...@@ -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_reserved(phys_addr_t addr);
int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); 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 * memblock_set_current_limit - Set the current allocation limit to allow
......
...@@ -898,11 +898,8 @@ static void __init_memblock memblock_dump(struct memblock_type *type, char *name ...@@ -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("MEMBLOCK configuration:\n");
pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size); pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment