public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: bus_id collisions
Date: Tue, 21 Nov 2006 17:23:41 +1100	[thread overview]
Message-ID: <1164090222.5597.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20061120.221329.74747650.davem@davemloft.net>

On Mon, 2006-11-20 at 22:13 -0800, David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Tue, 21 Nov 2006 15:02:16 +1100
> 
> > This has caused me some trouble with of_platform devices, which are
> > sort-of platform devices but linked to the Open Firmware device-tree, as
> > I generate their names based on the nodes in the tree which need not be
> > unique as long as they are unique under a given parent.
> > 
> > I've worked around it, but I though the comment might need to be
> > clarified.
> 
> BTW Ben, on sparc64 for of devices I use "%08x" and the PROM
> node ID as the bus_id[] to deal with this.

Yes, the phandle would have been a good option... 

Unfortunately, when we defined the simplified device-tree format for use
by platforms without a real Open Firmware (embedded etc...), we made the
phandle optional (the flat device-tree format that we defined doesn't
have it, it's added as an optional property linux,phandle only when a
node needs to be referenced by another one, like interrupt-map's
etc...). Part of the reason there was to please embedded folks who
scream at every single byte added anywhere :-)

I suppose I can still decide that it's also mandatory for nodes that are
to be used as of_platform_device's though... I need to discuss that with
the embedded folks.

(BTW. I still need to look into back-porting some of your changes to
that stuff and possibly having some of that code moved to a common
location... I hope I'll have some time for that early next year).

Ben.



  reply	other threads:[~2006-11-21  6:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-21  4:02 bus_id collisions Benjamin Herrenschmidt
2006-11-21  6:13 ` David Miller
2006-11-21  6:23   ` Benjamin Herrenschmidt [this message]
2006-11-21  6:41 ` Greg KH
2006-11-21  6:49   ` Benjamin Herrenschmidt
2006-11-22  4:38     ` Kumar Gala

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=1164090222.5597.3.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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