diff options
author | Alexander Kuleshov <kuleshovmail@gmail.com> | 2015-04-15 19:14:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:19 -0400 |
commit | 6a4055bc72a516bae3f607eda3e243d18e66bd49 (patch) | |
tree | c8442ae3d145b3d7e01dcc4337deba10990d9afc | |
parent | 7e1f049efb86bd86c06b80eeac0ef80cdeb8c0e7 (diff) |
mm/memblock.c: add debug output for memblock_add()
memblock_reserve() calls memblock_reserve_region() which prints debugging
information if 'memblock=debug' was passed on the command line. This
patch adds the same behaviour, but for memblock_add function().
[akpm@linux-foundation.org: s/memblock_memory/memblock_add/ in message]
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Philipp Hachtmann <phacht@linux.vnet.ibm.com>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Emil Medve <Emilian.Medve@freescale.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memblock.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 3f37a0bca5d5..9318b567ed79 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -580,10 +580,24 @@ int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size, | |||
580 | return memblock_add_range(&memblock.memory, base, size, nid, 0); | 580 | return memblock_add_range(&memblock.memory, base, size, nid, 0); |
581 | } | 581 | } |
582 | 582 | ||
583 | static int __init_memblock memblock_add_region(phys_addr_t base, | ||
584 | phys_addr_t size, | ||
585 | int nid, | ||
586 | unsigned long flags) | ||
587 | { | ||
588 | struct memblock_type *_rgn = &memblock.memory; | ||
589 | |||
590 | memblock_dbg("memblock_add: [%#016llx-%#016llx] flags %#02lx %pF\n", | ||
591 | (unsigned long long)base, | ||
592 | (unsigned long long)base + size - 1, | ||
593 | flags, (void *)_RET_IP_); | ||
594 | |||
595 | return memblock_add_range(_rgn, base, size, nid, flags); | ||
596 | } | ||
597 | |||
583 | int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size) | 598 | int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size) |
584 | { | 599 | { |
585 | return memblock_add_range(&memblock.memory, base, size, | 600 | return memblock_add_region(base, size, MAX_NUMNODES, 0); |
586 | MAX_NUMNODES, 0); | ||
587 | } | 601 | } |
588 | 602 | ||
589 | /** | 603 | /** |