[PATCH] mm/memblock: print memblock_remove

From: Minchan Kim
Date: Tue May 08 2018 - 06:42:37 EST


memblock_remove report is useful to see why MemTotal of /proc/meminfo
between two kernels makes difference.

Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
mm/memblock.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index 5228f594b13c..03d48d8835ba 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);
}

--
2.17.0.441.gb46fe60e1d-goog