[PATCH] powerpc: Export flat device tree via debugfs for debugging
Michael Ellerman
michael at ellerman.id.au
Tue May 2 10:20:00 EST 2006
On Mon, 2006-05-01 at 12:54 -0500, Kumar Gala wrote:
> On May 1, 2006, at 2:40 AM, Michael Ellerman wrote:
>
> > If DEBUG is turned on in prom.c, export the flat device tree via
> > debugfs.
> > This has been handy on several occasions.
> >
> > To look at it:
> > # mount -t debugfs none /sys/kernel/debug
> > # od -a /sys/kernel/debug/powerpc/flat-device-tree
> > and/or
> > # dtc -fI dtb /sys/kernel/debug/powerpc/flat-device-tree -O dts
> >
> > Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
> > ---
> >
> > arch/powerpc/kernel/prom.c | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > Index: to-merge/arch/powerpc/kernel/prom.c
> > ===================================================================
> > --- to-merge.orig/arch/powerpc/kernel/prom.c
> > +++ to-merge/arch/powerpc/kernel/prom.c
> > @@ -30,6 +30,7 @@
> > #include <linux/bitops.h>
> > #include <linux/module.h>
> > #include <linux/kexec.h>
> > +#include <linux/debugfs.h>
> >
> > #include <asm/prom.h>
> > #include <asm/rtas.h>
> > @@ -2009,3 +2010,27 @@ void kdump_move_device_tree(void)
> > /* XXX should we unreserve the old DT? */
> > }
> > #endif /* CONFIG_KEXEC */
> > +
> > +#ifdef DEBUG
>
> Shouldn't this also depend on DEBUGFS being built in.
It could, but DEBUG_FS is written so that you don't have to care, so I
didn't :)
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060502/8cf8c626/attachment.pgp>
More information about the Linuxppc-dev
mailing list