OpenFirmware devices and hotplug events

Brian King brking at
Thu Mar 18 03:11:47 EST 2004

Nathan Lynch wrote:
> 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.

It is possible to create binary sysfs attributes. Look at request_firmware.
These also do not have the PAGE_SIZE limitation on them, however, they get
read a page at a time, so this only works for fairly static data and not for
data that is in constant flux.

Brian King
eServer Storage I/O
IBM Linux Technology Center

** Sent via the linuxppc64-dev mail list. See

More information about the Linuxppc64-dev mailing list