[PATCH] Open Firmware device tree virtual filesystem

Segher Boessenkool segher at kernel.crashing.org
Tue Jan 2 07:28:52 EST 2007


>> IMHO, the directory entries in the filesystem
>> should be in the form "node-name at unit-address" (eg: /pci at 1f,0,
>> "pci" is the node name, "@" is the separator character defined
>> by IEEE 1275, and "1f,0" is the unit-address,
>> which are always guaranteed to be unique.
>
> They should be. The problem is buggy OF implementations. For example,
> both IBM and Apple OFs have the nasty habit of having under the CPU
> nodes an "l2-cache" node with no unit-address -and- a property with the
> same name

That is perfectly valid FWIW.  Not a "best practice" or anything,
but valid nonetheless.

Device tree semantics do not fit POSIX filesystem semantics 100%,
you do need some workarounds for some edge cases yes.

>> It's
>> not possible to have two ambiguously fully qualified nodes in the OFW
>> device tree, otherwise you would never be able to select
>> a specific one by name.
>
> Well, it happens to be the case though. The code is to work around 
> that.
> A normal bug-free tree should never trigger the workarounds.

Well it's not *technically* a bug to have two device nodes with
an exact identical path in OF, but sure :-)


Segher




More information about the Devel mailing list