[PATCH 1/3] memblock: let memblock_type_name know about physmem type

From: Heiko Carstens
Date: Fri Jan 20 2017 - 07:35:09 EST


Since commit 70210ed950b5 ("mm/memblock: add physical memory list")
the memblock structure knows about a physical memory list.

memblock_type_name() should return "physmem" instead of "unknown" if
the name of the physmem memblock_type is being asked for.

Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
mm/memblock.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index 7608bc305936..acbfa1dffff2 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -72,6 +72,10 @@ memblock_type_name(struct memblock_type *type)
return "memory";
else if (type == &memblock.reserved)
return "reserved";
+#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
+ else if (type == &memblock.physmem)
+ return "physmem";
+#endif
else
return "unknown";
}
--
2.8.4