Re: [RFC/PATCH 2/2] powerpc: Add legacy PCI access via sysfs

2008-10-03 Thread Jesse Barnes
On Friday, October 3, 2008 2:52 pm Benjamin Herrenschmidt wrote: > On Fri, 2008-10-03 at 08:59 -0700, Jesse Barnes wrote: > > Feel free to change the generic code if it makes things easier for you, > > the only limitation is that we have to live within the generic sysfs > > read/write functions. O

Re: [RFC/PATCH 2/2] powerpc: Add legacy PCI access via sysfs

2008-10-03 Thread Benjamin Herrenschmidt
On Fri, 2008-10-03 at 15:09 -0700, Jesse Barnes wrote: > On Friday, October 3, 2008 2:52 pm Benjamin Herrenschmidt wrote: > > On Fri, 2008-10-03 at 08:59 -0700, Jesse Barnes wrote: > > > Feel free to change the generic code if it makes things easier for you, > > > the only limitation is that we hav

Re: [RFC/PATCH 2/2] powerpc: Add legacy PCI access via sysfs

2008-10-03 Thread Benjamin Herrenschmidt
On Fri, 2008-10-03 at 08:59 -0700, Jesse Barnes wrote: > > Feel free to change the generic code if it makes things easier for you, the > only limitation is that we have to live within the generic sysfs read/write > functions. Obviously I didn't worry about it when doing this code on ia64... I

Re: [RFC/PATCH 2/2] powerpc: Add legacy PCI access via sysfs

2008-10-03 Thread Jesse Barnes
On Friday, October 3, 2008 2:49 am Benjamin Herrenschmidt wrote: > + /* WARNING: The generic code is idiotic. It gets passed a pointer > + * to what can be a 1, 2 or 4 byte quantity and always reads that > + * as a u32, which means that we have to correct the location of > + * th