[RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging

Michael Ellerman michael at ellerman.id.au
Mon May 1 10:53:41 EST 2006


Currently we have a macro called DBG() defined in most files in arch/powerpc,
which is used to do debugging printks.

In some files DBG evaluates to printk() and in others it becomes udbg_printf(),
but there doesn't seem to be any logic to explain why it's one or the other.
In fact in some files it'd be nice if it was both, so you could have early
debugging (udbg_printf), but then have things hit the dmesg buffer later (via
printk).

Using udbg_printf() in general is suboptimal IMHO because it bypasses the
printk buffer, so if you miss the messages on the screen you can't go back and
see them in dmesg.

So this series of patches rejiggers things so that we register the udbg
console really early, and therefore can always use printk. It then goes on to
change all the home spun DBG() macros into pr_debug() calls, from
include/linux/kernel.h

I haven't tested this extensively because I wanted to gauge people's reaction
first. It "works" on pSeries LPAR, and iSeries, but I haven't tested on 32-bit,
and I don't know that code well so I'm all ears on that.

cheers



More information about the Linuxppc-dev mailing list