ioremap and vmalloc

Sébastien Chrétien chretien at enseirb.fr
Sat Sep 20 03:47:43 EST 2008


I made a mistake. The right code is :

ioremap(0x20000000,0x40000) and ioremap(0x80000000,0x50000)



Grant Likely a écrit :
> On Fri, Sep 19, 2008 at 10:58 AM, Josh Boyer <jwboyer at gmail.com> wrote:
>   
>> On Fri, Sep 19, 2008 at 06:45:01PM +0200, =?ISO-8859-1?Q?S=E9bastien_Chr=E9tien_ wrote:
>>     
>>> if I write :
>>> ioremap(0x20000000,0x40000) and ioremap(0x20000000,0x50000)
>>>
>>> Will it crash ?
>>>       
>> I have no idea.  You haven't given us enough information to really answer
>> that.
>>     
>
> But I can say that the second ioremap() call makes the first ioremap()
> both redundant and inefficient.  You're using exactly the same base
> address so the same region is getting mapped twice.  Since the second
> call uses a bigger region than the first then the kernel will probably
> need to allocate another chunk of virtual address space to map it
> instead of reusing the first mapping.
>
> g.
>
>
>   



More information about the Linuxppc-dev mailing list