Devicetree
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: olpc ofw question
Date: Tue, 10 Aug 2010 20:40:10 -0400	[thread overview]
Message-ID: <20100810204010.134618fb@dev.queued.net> (raw)

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?

             reply	other threads:[~2010-08-11  0:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11  0:40 Andres Salomon [this message]
     [not found] ` <20100810204010.134618fb-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-11 20:48   ` olpc ofw question 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100810204010.134618fb@dev.queued.net \
    --to=dilinger-pffuokh25lwstnjn9+bgxg@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox