Skip to content

Commit 4ff7b82

Browse files
committed
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>
1 parent 9c8c27e commit 4ff7b82

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎include/linux/memblock.h‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ int memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
129129
int memblock_is_reserved(phys_addr_t addr);
130130
int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size);
131131

132-
void memblock_dump_all(void);
132+
extern void __memblock_dump_all(void);
133+
134+
static inline void memblock_dump_all(void)
135+
{
136+
if (memblock_debug)
137+
__memblock_dump_all();
138+
}
133139

134140
/**
135141
* memblock_set_current_limit - Set the current allocation limit to allow

‎mm/memblock.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -898,11 +898,8 @@ static void __init_memblock memblock_dump(struct memblock_type *type, char *name
898898
}
899899
}
900900

901-
void __init_memblock memblock_dump_all(void)
901+
void __init_memblock __memblock_dump_all(void)
902902
{
903-
if (!memblock_debug)
904-
return;
905-
906903
pr_info("MEMBLOCK configuration:\n");
907904
pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size);
908905

0 commit comments

Comments
 (0)