mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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(). [[email protected]: s/memblock_memory/memblock_add/ in message] Signed-off-by: Alexander Kuleshov <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Philipp Hachtmann <[email protected]> Cc: Fabian Frederick <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Emil Medve <[email protected]> Cc: Akinobu Mita <[email protected]> Cc: Tang Chen <[email protected]> Cc: Tony Luck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7e1f049efb
commit
6a4055bc72
1 changed files with 16 additions and 2 deletions
|
|
@ -580,10 +580,24 @@ int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size,
|
|||
return memblock_add_range(&memblock.memory, base, size, nid, 0);
|
||||
}
|
||||
|
||||
static int __init_memblock memblock_add_region(phys_addr_t base,
|
||||
phys_addr_t size,
|
||||
int nid,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct memblock_type *_rgn = &memblock.memory;
|
||||
|
||||
memblock_dbg("memblock_add: [%#016llx-%#016llx] flags %#02lx %pF\n",
|
||||
(unsigned long long)base,
|
||||
(unsigned long long)base + size - 1,
|
||||
flags, (void *)_RET_IP_);
|
||||
|
||||
return memblock_add_range(_rgn, base, size, nid, flags);
|
||||
}
|
||||
|
||||
int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size)
|
||||
{
|
||||
return memblock_add_range(&memblock.memory, base, size,
|
||||
MAX_NUMNODES, 0);
|
||||
return memblock_add_region(base, size, MAX_NUMNODES, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue