diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-28 01:13:22 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:28 -0400 |
commit | ea9e4376bb545e400a325b3d76fecd02815303c0 (patch) | |
tree | 3e9838c3a20cdbd3a99df53fbd96e198d0f37861 /mm/memblock.c | |
parent | 5e63cf43af844ed30acc278b38b8c9bc51eba493 (diff) |
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: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 5499ab162b9d..c3703abf057e 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -192,8 +192,6 @@ static int memblock_double_array(struct memblock_type *type) | |||
192 | if (!memblock_can_resize) | 192 | if (!memblock_can_resize) |
193 | return -1; | 193 | return -1; |
194 | 194 | ||
195 | pr_debug("memblock: %s array full, doubling...", memblock_type_name(type)); | ||
196 | |||
197 | /* Calculate new doubled size */ | 195 | /* Calculate new doubled size */ |
198 | old_size = type->max * sizeof(struct memblock_region); | 196 | old_size = type->max * sizeof(struct memblock_region); |
199 | new_size = old_size << 1; | 197 | new_size = old_size << 1; |
@@ -221,6 +219,9 @@ static int memblock_double_array(struct memblock_type *type) | |||
221 | } | 219 | } |
222 | new_array = __va(addr); | 220 | new_array = __va(addr); |
223 | 221 | ||
222 | memblock_dbg("memblock: %s array is doubled to %ld at [%#010llx-%#010llx]", | ||
223 | memblock_type_name(type), type->max * 2, (u64)addr, (u64)addr + new_size - 1); | ||
224 | |||
224 | /* Found space, we now need to move the array over before | 225 | /* Found space, we now need to move the array over before |
225 | * we add the reserved region since it may be our reserved | 226 | * we add the reserved region since it may be our reserved |
226 | * array itself that is full. | 227 | * array itself that is full. |
@@ -672,7 +673,7 @@ static void memblock_dump(struct memblock_type *region, char *name) | |||
672 | base = region->regions[i].base; | 673 | base = region->regions[i].base; |
673 | size = region->regions[i].size; | 674 | size = region->regions[i].size; |
674 | 675 | ||
675 | pr_info(" %s[0x%x]\t0x%016llx - 0x%016llx, 0x%llx bytes\n", | 676 | pr_info(" %s[%#x]\t[%#016llx-%#016llx], %#llx bytes\n", |
676 | name, i, base, base + size - 1, size); | 677 | name, i, base, base + size - 1, size); |
677 | } | 678 | } |
678 | } | 679 | } |