OpenFirmware devices and hotplug events

Greg KH greg at kroah.com
Thu Mar 18 04:08:45 EST 2004


On Wed, Mar 17, 2004 at 12:46:03AM -0600, Nathan Lynch wrote:
> 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...

Then use the binary file type for sysfs.  That is allowed for binary
blobs which the kernel does not translate at all, it is merely a conduit
to the raw data.  Firmware devices do this, as well as some EEPROM i2c
devices, and some BIOS data on i386 boxes.

So it would be very simple to move to sysfs...

thanks,

greg k-h

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list