Highmem issues with MMC filesystem

Hemanth V hemanthv at ti.com
Mon Mar 22 05:05:33 EDT 2010


> On Fri, 19 Mar 2010, Nicolas Pitre wrote:
>
>> A highmem page can have 2 states: virtually mapped in the pkmap area, or
>> not mapped at all.  When it is mapped then page_address() returns a
>> valid virtual address for it.  In that case the cache for that mapping
>> can be valid, even dirty.  So the DMA API will perform cache handling
>> before/after the DMA operation.
>>
>> However, before the page is unmapped, the VIVT cache has to be flushed
>> for that page.  This is why the DMA code currently doesn't bother doing
>> any L1 cache handling when a highmem page is not mapped -- the cache
>> just can't refer to such a page.
>>
>> But on ARMv6 this is different.  The L1 cache is VIPT and it therefore
>> doesn't have to be flushed as often as a VIVT cache.  Still, as far as I
>> know, the highmem code currently always flush any page to be unmapped.
>> But somewhere somehow an unmapped highmem page becomes subject to DMA
>> and apparently can still be L1 cached.  But the DMA code doesn't flush
>> its cache due to the page not being mapped and then problems occur.
>
> And here's a patch to test that hypothesis.  With this patch, all the
> issues with highmem on my ARMv6 system are gone.
>

Modified version of this patch also solves the problem for 2.6.32-rc7
on ARM v7.

Thanks
Hemanth





More information about the linux-arm-kernel mailing list