Highmem issues with MMC filesystem

Nicolas Pitre nico at fluxnic.net
Mon Mar 22 08:50:26 EDT 2010

On Mon, 22 Mar 2010, Hemanth V wrote:

> > 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.

OK thanks for testing.  I'll work on a proper patch now.


More information about the linux-arm-kernel mailing list