ARM: mm: fix MMU mapping of CMA regions
authorChris Brand <cbrand@broadcom.com>
Tue, 7 Aug 2012 12:01:14 +0000 (14:01 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 9 Aug 2012 05:46:07 +0000 (07:46 +0200)
Fix dma_contiguous_remap() so that it continues through all the
regions, even after encountering one that is outside lowmem.
Without this change, if you have two CMA regions, the first outside
lowmem and the seocnd inside lowmem, only the second one will get
set up in the MMU. Data written to that region then doesn't get
automatically flushed from the cache into memory.

Signed-off-by: Chris Brand <cbrand@broadcom.com>
[extended patch subject with 'fix' word]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
arch/arm/mm/dma-mapping.c

index c2cdf6500f75dc5a1ab5a688ea305099e8d30057..334dd79ad5e699f6ff302c0887bc21d7cc738b75 100644 (file)
@@ -358,7 +358,7 @@ void __init dma_contiguous_remap(void)
                if (end > arm_lowmem_limit)
                        end = arm_lowmem_limit;
                if (start >= end)
-                       return;
+                       continue;
 
                map.pfn = __phys_to_pfn(start);
                map.virtual = __phys_to_virt(start);