Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Tejun Heo 4ff7b82f 9c8c27e2

+8 -5
+7 -1
include/linux/memblock.h
··· 129 129 int memblock_is_reserved(phys_addr_t addr); 130 130 int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); 131 131 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 + } 133 139 134 140 /** 135 141 * memblock_set_current_limit - Set the current allocation limit to allow
+1 -4
mm/memblock.c
··· 898 898 } 899 899 } 900 900 901 - void __init_memblock memblock_dump_all(void) 901 + void __init_memblock __memblock_dump_all(void) 902 902 { 903 - if (!memblock_debug) 904 - return; 905 - 906 903 pr_info("MEMBLOCK configuration:\n"); 907 904 pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size); 908 905