mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 09:56:46 +00:00
[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>
This commit is contained in:
parent
5444a5e9e8
commit
eb481899aa
@ -22,35 +22,38 @@
|
|||||||
#include "mmu_decl.h" /* for __max_low_memory */
|
#include "mmu_decl.h" /* for __max_low_memory */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct lmb lmb;
|
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include <asm/udbg.h>
|
||||||
|
#define DBG(fmt...) udbg_printf(fmt)
|
||||||
|
#else
|
||||||
|
#define DBG(fmt...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct lmb lmb;
|
||||||
|
|
||||||
void lmb_dump_all(void)
|
void lmb_dump_all(void)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
||||||
udbg_printf("lmb_dump_all:\n");
|
DBG("lmb_dump_all:\n");
|
||||||
udbg_printf(" memory.cnt = 0x%lx\n",
|
DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt);
|
||||||
lmb.memory.cnt);
|
DBG(" memory.size = 0x%lx\n", lmb.memory.size);
|
||||||
udbg_printf(" memory.size = 0x%lx\n",
|
|
||||||
lmb.memory.size);
|
|
||||||
for (i=0; i < lmb.memory.cnt ;i++) {
|
for (i=0; i < lmb.memory.cnt ;i++) {
|
||||||
udbg_printf(" memory.region[0x%x].base = 0x%lx\n",
|
DBG(" memory.region[0x%x].base = 0x%lx\n",
|
||||||
i, lmb.memory.region[i].base);
|
i, lmb.memory.region[i].base);
|
||||||
udbg_printf(" .size = 0x%lx\n",
|
DBG(" .size = 0x%lx\n",
|
||||||
lmb.memory.region[i].size);
|
lmb.memory.region[i].size);
|
||||||
}
|
}
|
||||||
|
|
||||||
udbg_printf("\n reserved.cnt = 0x%lx\n",
|
DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
|
||||||
lmb.reserved.cnt);
|
DBG(" reserved.size = 0x%lx\n", lmb.reserved.size);
|
||||||
udbg_printf(" reserved.size = 0x%lx\n",
|
|
||||||
lmb.reserved.size);
|
|
||||||
for (i=0; i < lmb.reserved.cnt ;i++) {
|
for (i=0; i < lmb.reserved.cnt ;i++) {
|
||||||
udbg_printf(" reserved.region[0x%x].base = 0x%lx\n",
|
DBG(" reserved.region[0x%x].base = 0x%lx\n",
|
||||||
i, lmb.reserved.region[i].base);
|
i, lmb.reserved.region[i].base);
|
||||||
udbg_printf(" .size = 0x%lx\n",
|
DBG(" .size = 0x%lx\n",
|
||||||
lmb.reserved.region[i].size);
|
lmb.reserved.region[i].size);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user