OpenFirmware devices and hotplug events
Nathan Lynch
nathanl at austin.ibm.com
Wed Mar 17 17:46:03 EST 2004
Greg KH wrote:
> It looks like a portion of the device-tree is in sysfs today, with the
> different busses, right? It shouldn't be that big of a leap.
One sticking point is that sysfs attribute "show" methods are restricted
to returning no more than PAGE_SIZE bytes (according to
Documentation/filesystems/sysfs.txt). Assuming that we map Open
Firmware properties to sysfs attributes, the device tree representation
can easily have attributes in excess of PAGE_SIZE. Some of these are
actually important -- the "ibm,drc-indexes" property enumerates
resources (e.g. CPUs, memory) that may be acquired from the hypervisor.
I believe Anton had one of these that was over 600K the other day...
Another possible issue: how stringent is the requirement that
attributes' show methods return only ascii text? Many (if not most) of
the properties that exist in an OF device tree are just binary blobs,
and that's how they are exported to userspace through /proc/device-tree.
Nathan
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list