Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-10 Thread Tejun Heo
Kumar Gala wrote: but there is no reason not to make it work properly. For example I believe libata uses devm_* and the fsl SATA driver (non-PCI) will need to work in cases similar to the 44x. Well, as for sata_fsl, it calls of_iomap() which does The Right Thing. Fair, but I don't see w

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-10 Thread Kumar Gala
On Apr 10, 2008, at 1:24 PM, Sergei Shtylyov wrote: Kumar Gala wrote: Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. PowerPC 44x). You should have

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-10 Thread Sergei Shtylyov
Kumar Gala wrote: Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. PowerPC 44x). You should have used resource_size_t for the 'offset' parameter. As t

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-10 Thread Kumar Gala
On Apr 10, 2008, at 11:56 AM, Sergei Shtylyov wrote: Hello, I wrote: Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. PowerPC 44x). You should have us

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-10 Thread Sergei Shtylyov
Hello, I wrote: Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. PowerPC 44x). You should have used resource_size_t for the 'offset' parameter. As this m

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-08 Thread Tejun Heo
Sergei Shtylyov wrote: Yeah, right please go ahead. But I wonder whether any BIOS was actually crazy enough to map mmio region above 4G on 32bit machine. This is a *hardware* mapping on some non-x86 platforms (like PPC 44x or MIPS Alchemy). The arch/ppc/ and arch/mips/ kernels have special

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-08 Thread Sergei Shtylyov
Tejun Heo wrote: A very late comment but nevertheless... :-) Better late than never. :-) Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. Power

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-08 Thread Tejun Heo
Sergei Shtylyov wrote: A very late comment but nevertheless... :-) Better late than never. Those functions are going to break on 32-bit platforms with extended physical address (well, that's starting with Pentiums which had 36-bit PAE :-) AND devices mapped beyond 4 GB (e.g. PowerPC 44

Re: [PATCH 6/13] devres: implement managed iomap interface

2008-04-07 Thread Sergei Shtylyov
Tejun Heo wrote: +/** + * devm_ioremap - Managed ioremap() + * @dev: Generic device to remap IO address for + * @offset: BUS offset to map + * @size: Size of map + * + * Managed ioremap(). Map is automatically unmapped on driver detach. + */ +void __iomem *devm_ioremap(struct device *dev, unsig