All of lore.kernel.org
 help / color / mirror / Atom feed
* olpc ofw question
@ 2010-08-11  0:40 Andres Salomon
       [not found] ` <20100810204010.134618fb-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Andres Salomon @ 2010-08-11  0:40 UTC (permalink / raw)
  To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

Hi,

I've run a comparison between OLPC's old OFW code (which mounts the
device-tree at /ofw, and makes use of the sparc code) versus the code
which I'm planning to send upstream (which mounts the device-tree
at /proc/device-tree, and makes use of PROC_DEVTREE).  The results are
here:

http://dev.queued.net/~dilinger/dt.diff

That's from running:

find /proc/device-tree -type f | sort | while read f; do echo $f | sed 's#/proc/device-tree##'; sudo od -c $f; done > ~/dt-proc
find /ofw -type f | sort | while read f; do echo $f | sed 's#/ofw##'; sudo od -c $f; done > ~/dt-ofw
diff -u dt-ofw dt-proc > dt.diff

Note that this was run on two different OLPC XO-1 machines, hence the
difference in serial numbers, mfg-data, and other such things.

There are two things I'm concerned about; the first is that device names
are mangled.  For some things (ie, "/battery@0/name" => "/battery/name"),
I don't particularly care; for others ("/pci/audio@f,3/device-id"
=> "/pci/audio/device-id"), it's kind of annoying to lose that extra
bit of information.  What's the purpose being the mangling that
happens w/ /proc/device-tree?  I the following comment in proc_devtree.c:

 * For a node with a name like "gc@10", we make symlinks called "gc"
 * and "@10" to it.

However, I'm not seeing *any* symlinks at all in /proc/device-tree.

My second concern is the renaming of /pci/usb@f,4 (the ohci device)
to /pci/usb.  I'm not sure if that's due to a bug in the devtree code,
OFW, or my patch.  Note that the kernel spits out the following messages
while populating /proc/device-tree:


[    0.130869] device-tree: Duplicate name in /pci, renamed to "usb#1"
[    0.131589] device-tree: Duplicate name in /, renamed to "dropin-fs#1"

I'm assuming that the code first renamed the ohci device from
/pci/usb@f,4 to /pci/usb, attempted to then rename the
wireless chip from /pci/usb@f,5 to /pci/usb, and spit out
that error.  That seems.. odd.

Any insight into the reasoning for this mangling?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-15  1:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11  0:40 olpc ofw question Andres Salomon
     [not found] ` <20100810204010.134618fb-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-11 20:48   ` Segher Boessenkool
     [not found]     ` <55307.84.105.60.153.1281559723.squirrel-JorI+TVEvZrY24RiXHRV3ti2O/JbrIOy@public.gmane.org>
2010-08-11 21:20       ` Andres Salomon
     [not found]         ` <20100811172045.77cda7a0-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-12  1:53           ` Mitch Bradley
     [not found]             ` <4C635428.9010009-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-08-15  0:35               ` Andres Salomon
2010-08-15  1:52                 ` Mitch Bradley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.