summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lmb.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/lib/lmb.c b/lib/lmb.c
index 2d680d8d02..75082f3559 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -14,33 +14,37 @@
#define LMB_ALLOC_ANYWHERE 0
-void lmb_dump_all(struct lmb *lmb)
+void lmb_dump_all_force(struct lmb *lmb)
{
-#ifdef DEBUG
unsigned long i;
- debug("lmb_dump_all:\n");
- debug(" memory.cnt = 0x%lx\n", lmb->memory.cnt);
- debug(" memory.size = 0x%llx\n",
- (unsigned long long)lmb->memory.size);
+ printf("lmb_dump_all:\n");
+ printf(" memory.cnt = 0x%lx\n", lmb->memory.cnt);
+ printf(" memory.size = 0x%llx\n",
+ (unsigned long long)lmb->memory.size);
for (i = 0; i < lmb->memory.cnt; i++) {
- debug(" memory.reg[0x%lx].base = 0x%llx\n", i,
- (unsigned long long)lmb->memory.region[i].base);
- debug(" .size = 0x%llx\n",
- (unsigned long long)lmb->memory.region[i].size);
+ printf(" memory.reg[0x%lx].base = 0x%llx\n", i,
+ (unsigned long long)lmb->memory.region[i].base);
+ printf(" .size = 0x%llx\n",
+ (unsigned long long)lmb->memory.region[i].size);
}
- debug("\n reserved.cnt = 0x%lx\n",
- lmb->reserved.cnt);
- debug(" reserved.size = 0x%llx\n",
- (unsigned long long)lmb->reserved.size);
+ printf("\n reserved.cnt = 0x%lx\n", lmb->reserved.cnt);
+ printf(" reserved.size = 0x%llx\n",
+ (unsigned long long)lmb->reserved.size);
for (i = 0; i < lmb->reserved.cnt; i++) {
- debug(" reserved.reg[0x%lx].base = 0x%llx\n", i,
- (unsigned long long)lmb->reserved.region[i].base);
- debug(" .size = 0x%llx\n",
- (unsigned long long)lmb->reserved.region[i].size);
+ printf(" reserved.reg[0x%lx].base = 0x%llx\n", i,
+ (unsigned long long)lmb->reserved.region[i].base);
+ printf(" .size = 0x%llx\n",
+ (unsigned long long)lmb->reserved.region[i].size);
}
-#endif /* DEBUG */
+}
+
+void lmb_dump_all(struct lmb *lmb)
+{
+#ifdef DEBUG
+ lmb_dump_all_force(lmb);
+#endif
}
static long lmb_addrs_overlap(phys_addr_t base1, phys_size_t size1,