]> git.baikalelectronics.ru Git - kernel.git/commitdiff
memblock: let memblock_type_name know about physmem type
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 24 Feb 2017 22:55:54 +0000 (14:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:53 +0000 (17:46 -0800)
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 <heiko.carstens@de.ibm.com>
Cc: Philipp Hachtmann <phacht@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memblock.c

index c004f52be419be1c53ab08c14313906001c19aca..f82c65aace9ac5056094109bb0b90d014b24ad1a 100644 (file)
@@ -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";
 }