| From dhobsong@igel.co.jp Mon Oct 29 00:53:23 2012 |
| From: Damian Hobson-Garcia <dhobsong@igel.co.jp> |
| Date: Mon, 29 Oct 2012 16:50:55 +0900 |
| Subject: [PATCH v2 38/58] ARM: mm: fix MMU mapping of CMA regions |
| To: greg@kroah.com, laurent.pinchart@ideasonboard.com, horms@verge.net.au |
| Cc: ltsi-dev@lists.linuxfoundation.org, dhobsong@igel.co.jp |
| Message-ID: <1351497075-32717-39-git-send-email-dhobsong@igel.co.jp> |
| |
| |
| From: Chris Brand <cbrand@broadcom.com> |
| |
| 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> |
| (cherry picked from commit 39f78e70567a07a6fc0d7a4ca9e3331e44dd400d) |
| |
| Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> |
| Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| --- |
| arch/arm/mm/dma-mapping.c | 2 +- |
| 1 files changed, 1 insertions(+), 1 deletions(-) |
| |
| diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c |
| index 6f85d3d..cce3c0d 100644 |
| --- a/arch/arm/mm/dma-mapping.c |
| +++ b/arch/arm/mm/dma-mapping.c |
| @@ -388,7 +388,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); |
| -- |
| 1.7.5.4 |
| |