[PATCH 2/8] ARM: dma-mapping: implement dma_map_single on top of dma_map_page
From: m.szyprowski@samsung.com (Marek Szyprowski)
Date: 2011-06-20 15:15:49
Also in:
linux-arch, linux-mm
From: m.szyprowski@samsung.com (Marek Szyprowski)
Date: 2011-06-20 15:15:49
Also in:
linux-arch, linux-mm
Hello, On Monday, June 20, 2011 4:39 PM Russell King - ARM Linux wrote:
On Mon, Jun 20, 2011 at 09:50:07AM +0200, Marek Szyprowski wrote:quoted
This patch consolidates dma_map_single and dma_map_page calls. This is required to let dma-mapping framework on ARM architecture use common, generic dma-mapping helpers.This breaks DMA API debugging, which requires that dma_map_page and dma_unmap_page are paired separately from dma_map_single and dma_unmap_single().
Ok, right. This can be fixed by creating appropriate static inline functions in dma-mapping.h and moving dma_debug_* calls there. These function will be later removed by using dma_map_ops and include/asm-generic/dma-mapping-common.h inlines, which do all the dma_debug_* calls correctly anyway.
This also breaks dmabounce when used with a highmem-enabled system - dmabounce refuses the dma_map_page() API but allows the dma_map_single() API.
I really not sure how this change will break dma bounce code. Does it mean that it is allowed to call dma_map_single() on kmapped HIGH_MEM page? Best regards -- Marek Szyprowski Samsung Poland R&D Center