Re: [PATCH] Open Firmware device tree virtual filesystem

From: Segher Boessenkool
Date: Tue Jan 02 2007 - 07:30:14 EST


IMHO, the directory entries in the filesystem
should be in the form "node-name@unit-address" (eg: /pci@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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/