Commit ea9e4376 authored by Yinghai Lu's avatar Yinghai Lu Committed by Benjamin Herrenschmidt

memblock: Improve debug output when resizing the reserve array

Print out the location info in addition to which array is being
resized. Also use memblocK_dbg() to put that under control of
the memblock_debug flag.
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 5e63cf43
...@@ -192,8 +192,6 @@ static int memblock_double_array(struct memblock_type *type) ...@@ -192,8 +192,6 @@ static int memblock_double_array(struct memblock_type *type)
if (!memblock_can_resize) if (!memblock_can_resize)
return -1; return -1;
pr_debug("memblock: %s array full, doubling...", memblock_type_name(type));
/* Calculate new doubled size */ /* Calculate new doubled size */
old_size = type->max * sizeof(struct memblock_region); old_size = type->max * sizeof(struct memblock_region);
new_size = old_size << 1; new_size = old_size << 1;
...@@ -221,6 +219,9 @@ static int memblock_double_array(struct memblock_type *type) ...@@ -221,6 +219,9 @@ static int memblock_double_array(struct memblock_type *type)
} }
new_array = __va(addr); new_array = __va(addr);
memblock_dbg("memblock: %s array is doubled to %ld at [%#010llx-%#010llx]",
memblock_type_name(type), type->max * 2, (u64)addr, (u64)addr + new_size - 1);
/* Found space, we now need to move the array over before /* Found space, we now need to move the array over before
* we add the reserved region since it may be our reserved * we add the reserved region since it may be our reserved
* array itself that is full. * array itself that is full.
...@@ -672,7 +673,7 @@ static void memblock_dump(struct memblock_type *region, char *name) ...@@ -672,7 +673,7 @@ static void memblock_dump(struct memblock_type *region, char *name)
base = region->regions[i].base; base = region->regions[i].base;
size = region->regions[i].size; size = region->regions[i].size;
pr_info(" %s[0x%x]\t0x%016llx - 0x%016llx, 0x%llx bytes\n", pr_info(" %s[%#x]\t[%#016llx-%#016llx], %#llx bytes\n",
name, i, base, base + size - 1, size); name, i, base, base + size - 1, size);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment