From: Minchan Kim Date: Fri, 8 Jun 2018 00:07:35 +0000 (-0700) Subject: mm/memblock: print memblock_remove X-Git-Tag: v4.18-rc1~97^2~69 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=25cf23d7a95716fc6eb165208b5eb2e3b2e86f82;p=uclinux-h8%2Flinux.git mm/memblock: print memblock_remove memblock_remove report is useful to see why MemTotal of /proc/meminfo between two kernels makes difference. Link: http://lkml.kernel.org/r/20180508104223.8028-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Andrew Morton Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memblock.c b/mm/memblock.c index eec988c21c7e..93ad42bc8a73 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -697,6 +697,11 @@ static int __init_memblock memblock_remove_range(struct memblock_type *type, int __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size) { + phys_addr_t end = base + size - 1; + + memblock_dbg("memblock_remove: [%pa-%pa] %pS\n", + &base, &end, (void *)_RET_IP_); + return memblock_remove_range(&memblock.memory, base, size); }