/proc/device-tree is working

Arnd Bergmann arnd at arndb.de
Tue Dec 26 22:37:38 EST 2006


On Tuesday 26 December 2006 11:34, Mitch Bradley wrote:

> c) Decide whether or not we want to go ahead with the /proc/device-tree 
> version, or convert to /sys first.  If the latter, we have to develop 
> the sysfs version of the code.  I think I understand how to convert to 
> sysfs for the bulk of the code, but there is still an issue that I don't 
> grok, namely the kobjects tie-in.

We tried that on powerpc before and came to the conclusion that it's not
possible to do with sysfs. The point here is that sysfs has its own
view of how properties ("attributes") can be named. In particular, the
names of each attribute in sysfs are supposed to be known at compile
time.

Do you use the fs/proc/proc_devtree.c code right now with i386 specific
additions for populating the tree, or did you write a completely
separate implementation of /proc/device-tree?

An alternative approach would be to write your own file system.
I did a prototype for this some time ago, but never finished it
(probably doesn't even load). You can find my original patch at
http://ozlabs.org/pipermail/linuxppc64-dev/2006-January/007510.html

The discussion about that patch ended with the conclusion that
for complex device trees, it might waste too much RAM, since every
property is represented with a dentry and an inode struct that
are kept resident in memory. In order to make that more efficient,
it would need to use a dynamic inode cache, like procfs or sysfs
do, but that requires more code, while my version needs only 200
lines ;-)

> f) Do whatever needs to be done to announce the patch, submit it 
> upstream, or whatever we want to do on that front.

Please keep the linuxppc-dev at ozlabs.org mailing list on Cc: on
whatever you do with /proc/device-tree, that's where most of the
people hang out that work with the current code.

	Arnd <><



More information about the Devel mailing list