[PATCH] [POWERPC] Port fixmap from x86 and use for kmap_atomic

Kumar Gala galak at kernel.crashing.org
Tue Apr 22 03:44:55 EST 2008


On Apr 19, 2008, at 6:07 AM, Gerhard Pircher wrote:
>
> -------- Original-Nachricht --------
>> Datum: Thu, 17 Apr 2008 21:57:05 -0500 (CDT)
>> Von: Kumar Gala <galak at kernel.crashing.org>
>> An: Paul Mackerras <paulus at samba.org>
>> CC: linuxppc-dev at ozlabs.org
>> Betreff: [PATCH] [POWERPC] Port fixmap from x86 and use for  
>> kmap_atomic
>
>> The fixmap code from x86 allows us to have compile time virtual  
>> addresses
>> that we change the physical addresses of at run time.
> ...
>> +/*
>> + * Here we define all the compile-time 'special' virtual
>> + * addresses. The point is to have a constant address at
>> + * compile time, but to set the physical address only
>> + * in the boot process. We allocate these special addresses
>> + * from the end of virtual memory (0xfffff000) backwards.
>> + * Also this lets us do fail-safe vmalloc(), we
>> + * can guarantee that these special addresses and
>> + * vmalloc()-ed addresses never overlap.
> I don't understand how highmem works, but I'm just interested to  
> know, if
> this implementation could conflict somehow with the non coherent DMA
> implementation in dma-noncoherent.c (which uses address space from
> 0xff100000 to 0xff300000 for DMA memory).

if the size is fixed we can easily change it so the Kconfig options  
aren't needed anymore.

> On the other side could dma-noncoherent.c benefit from fixmaps so  
> that it
> isn't necessary to configure a start address for DMA allocations?

Its possible however the fixmap is all about keeping the VA the same  
while changing the PA. I think some work that is being done for the SW  
IOMMU might be more useful to your needs.

- k



More information about the Linuxppc-dev mailing list