Skip to contentSkip to conversation

memblock: let memblock_type_name know about physmem type

PATCH New [email protected] 1 participant 1 message Feb 24, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 7/124 memblock: let memblock_type_name know about physmem type

From: Heiko Carstens <[email protected]>
Subject: memblock: let memblock_type_name know about physmem type

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.

---

 mm/memblock.c |    4 ++++
 1 file changed, 4 insertions(+)
mm/memblock.c renamed from mm/memblock.c~memblock-let-memblock_type_name-know-about-physmem-type +4 -0
diff -puN mm/memblock.c~memblock-let-memblock_type_name-know-about-physmem-type mm/memblock.c
@@ -72,6 +72,10 @@ memblock_type_name(struct memblock_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";
 }

_