[PATCH 4/4] Add irq debugfs and virq_mapping for getting thevirq to irq host's hwirq mapping list.

Michael Ellerman michael at ellerman.id.au
Tue Mar 27 13:21:05 EST 2007


On Tue, 2007-03-20 at 17:51 +0800, Zhang Wei-r63237 wrote:
> > 
> > Minor nit. Should we be creating a 'powerpc' directory first, and
> > putting the 'irq' file under that? Otherwise we risk clashing 
> > with some
> > generic code that creates a file called 'irq' in debugfs.
> > 
> > cheers
> > 
> Hi, Michael,
> 
> I've seen some codes in arch/powerpc/kernel/prom.c to create debugfs
> dir "powerpc". But those codes were enabled by a local macro 'DEBUG'.
> There is a little problem. Maybe I should change '#ifdef DEBUG' to
> '#ifdef CONFIG_DEBUG_FS' before the export_flat_device_tree() function
> in arch/powerpc/kernel/prom.c. How about it?

No, we don't want to always export the flat device tree.

Instead I think you should add a function in
arch/powerpc/kernel/setup-common.c which creates the powerpc directory
if CONFIG_DEBUG_FS is enabled, make it an arch_initcall. Then the flat
device tree code can use that directory, and so can your irq stuff.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

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: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070327/3d7286d8/attachment.pgp>


More information about the Linuxppc-dev mailing list