[PATCH 03/23] lmb: Print new doubled array location info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



so will have more idea where it is,  use lmb_debug to controll it

-v2: use lmb_dbg instead of " if (lmb_debug) "

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
---
 lib/lmb.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/lmb.c b/lib/lmb.c
index bbdb1ec..dde8d04 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -192,8 +192,6 @@ static int lmb_double_array(struct lmb_type *type)
 	if (!lmb_can_resize)
 		return -1;
 
-	pr_debug("lmb: %s array full, doubling...", lmb_type_name(type));
-
 	/* Calculate new doubled size */
 	old_size = type->max * sizeof(struct lmb_region);
 	new_size = old_size << 1;
@@ -221,6 +219,9 @@ static int lmb_double_array(struct lmb_type *type)
 	}
 	new_array = __va(addr);
 
+	lmb_dbg("lmb: %s array is doubled to %ld at [%#010llx - %#010llx]",
+		 lmb_type_name(type), type->max * 2, (u64)addr, (u64)addr + new_size);
+
 	/* Found space, we now need to move the array over before
 	 * we add the reserved region since it may be our reserved
 	 * array itself that is full.
@@ -637,8 +638,8 @@ static void lmb_dump(struct lmb_type *region, char *name)
 		base = region->regions[i].base;
 		size = region->regions[i].size;
 
-		pr_info(" %s[0x%x]\t0x%016llx - 0x%016llx, 0x%llx bytes\n",
-		    name, i, base, base + size - 1, size);
+		pr_info(" %s[%#x]\t[%#016llx - %#016llx], %#llx bytes\n",
+		    name, i, base, base + size, size);
 	}
 }
 
-- 
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux