From: Heiko Carstens Date: Fri, 24 Feb 2017 22:55:54 +0000 (-0800) Subject: memblock: let memblock_type_name know about physmem type X-Git-Tag: v5.15~11801^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7409c5f738c879f7595b46314635c02c4c162484;p=platform%2Fkernel%2Flinux-starfive.git 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. Link: http://lkml.kernel.org/r/20170120123456.46508-2-heiko.carstens@de.ibm.com Signed-off-by: Heiko Carstens Cc: Philipp Hachtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memblock.c b/mm/memblock.c index c004f52..f82c65a 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"; }