[PATCH/RFC] add proc_dir_entry fields to device_node

Nathan Lynch nathanl at austin.ibm.com
Sat Oct 4 02:22:01 EST 2003


Hi-

I am doing some ppc64 work to enable dynamic addition and removal of
nodes in /proc/device-tree.  It seems that recording a node's directory
and symlinks (if any) in the device_node is the easiest way to assure
that a node is cleaned up properly after deletion.

I need to add a few lines to fs/proc/proc_devtree.c::add_node() to
record the proc entries for each node as it is processed.  These will
refer to fields that do not yet exist in ppc's device_node.  I propose
adding these fields to ppc's device_node (patch attached).  If that
comment in prom.h about breaking BootX is still valid, there are
alternatives, but they would likely involve ifdefs and macros.

I have attached the proposed changes in separate patches against linus
2.5 bk.  The proc_devtree patch is for illustration purposes -- the
patch I submit to lkml will make add_node() extern and place its
declaration in the proper header.

Comments?

Nathan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc_device_node.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20031003/70047577/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: proc_devtree.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20031003/70047577/attachment.txt>


More information about the Linuxppc-dev mailing list