aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/lmb.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-11-14 22:49:22 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-15 21:28:40 -0500
commiteb481899aa319cf5cbeccfd9deac907300698b57 (patch)
tree2dc0499415e968fca864a2ba38674dbced6094fb /arch/powerpc/mm/lmb.c
parent5444a5e9e872f599ec12534bd1bf9bc79a1c72ca (diff)
[PATCH] powerpc: Fixup debugging in lmb.c
Somewhere we lost the include of udbg.h in lmb.c. While we're there, add a DBG macro like every other file has and use it in lmb_dump_all(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/lmb.c')
-rw-r--r--arch/powerpc/mm/lmb.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 9b5aa6808eb8..9584608fd768 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -22,35 +22,38 @@
22#include "mmu_decl.h" /* for __max_low_memory */ 22#include "mmu_decl.h" /* for __max_low_memory */
23#endif 23#endif
24 24
25struct lmb lmb;
26
27#undef DEBUG 25#undef DEBUG
28 26
27#ifdef DEBUG
28#include <asm/udbg.h>
29#define DBG(fmt...) udbg_printf(fmt)
30#else
31#define DBG(fmt...)
32#endif
33
34struct lmb lmb;
35
29void lmb_dump_all(void) 36void lmb_dump_all(void)
30{ 37{
31#ifdef DEBUG 38#ifdef DEBUG
32 unsigned long i; 39 unsigned long i;
33 40
34 udbg_printf("lmb_dump_all:\n"); 41 DBG("lmb_dump_all:\n");
35 udbg_printf(" memory.cnt = 0x%lx\n", 42 DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt);
36 lmb.memory.cnt); 43 DBG(" memory.size = 0x%lx\n", lmb.memory.size);
37 udbg_printf(" memory.size = 0x%lx\n",
38 lmb.memory.size);
39 for (i=0; i < lmb.memory.cnt ;i++) { 44 for (i=0; i < lmb.memory.cnt ;i++) {
40 udbg_printf(" memory.region[0x%x].base = 0x%lx\n", 45 DBG(" memory.region[0x%x].base = 0x%lx\n",
41 i, lmb.memory.region[i].base); 46 i, lmb.memory.region[i].base);
42 udbg_printf(" .size = 0x%lx\n", 47 DBG(" .size = 0x%lx\n",
43 lmb.memory.region[i].size); 48 lmb.memory.region[i].size);
44 } 49 }
45 50
46 udbg_printf("\n reserved.cnt = 0x%lx\n", 51 DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
47 lmb.reserved.cnt); 52 DBG(" reserved.size = 0x%lx\n", lmb.reserved.size);
48 udbg_printf(" reserved.size = 0x%lx\n",
49 lmb.reserved.size);
50 for (i=0; i < lmb.reserved.cnt ;i++) { 53 for (i=0; i < lmb.reserved.cnt ;i++) {
51 udbg_printf(" reserved.region[0x%x].base = 0x%lx\n", 54 DBG(" reserved.region[0x%x].base = 0x%lx\n",
52 i, lmb.reserved.region[i].base); 55 i, lmb.reserved.region[i].base);
53 udbg_printf(" .size = 0x%lx\n", 56 DBG(" .size = 0x%lx\n",
54 lmb.reserved.region[i].size); 57 lmb.reserved.region[i].size);
55 } 58 }
56#endif /* DEBUG */ 59#endif /* DEBUG */