lkml.org 
[lkml]   [2008]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 6/13] devres: implement managed iomap interface
Date

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 used resource_size_t for the
>>>> 'offset' parameter. As this most probably means that libata is
>>>> broken on such platforms, I'm going to submit a patch...
>
>> It's broken with drivers using MMIO, I meant to say.
>
> Oops, I meant PCI drivers here, at least for the time being. And
> it looks like that was a false alarm. :-]
>
>>> 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 hooks called from ioremap() which help create an illusion
>> that the PCI memory space on such platforms (not only it) is mapped
>> below 4 GB; arch/powerpc/ kernel doesn't do this anymore -- hence
>> this newly encountered issue.
>
> I thought that pcim_iomap() used devm_ioremap() or something --
> which of course turned to be wrong. devm_ioremap() alone is yet safe
> since there are no users for it amongst PPC 44x platform device
> drivers...

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.

- k


\
 
 \ /
  Last update: 2008-04-10 20:25    [W:0.437 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site