[PATCHv8 07/10] ARM: dma-mapping: move all dma bounce code to separate dma ops structure

Arnd Bergmann arnd at arndb.de
Tue Apr 10 09:17:08 EDT 2012


On Tuesday 10 April 2012, Marek Szyprowski wrote:
> Before patch no 6, there were custom methods for all scatter/gather
> related operations. They iterated over the whole scatter list and called
> cache related operations directly (which in turn checked if we use dma
> bounce code or not and called respective version). Patch no 6 changed
> them not to use such shortcut for direct calling cache related operations.
> 
> Instead it provides similar loop over scatter list and calls methods
> from the current device's dma_map_ops structure. This way, after patch no 
> 7 these functions call simple dma_map_page() method for all standard 
> devices and dma bounce aware version for devices registered for dma 
> bouncing (with use different dma_map_ops).

Ok, thanks for the explanation.

> I can provide a separate set of scatter/gather list related functions for
> the linear dma mapping implementation and dma bouncing implementation 
> if you think that the current approach is too complicated or 
> over-engineered.

It's probably not needed, though I have not looked at the big picture
with all the patches applied. which I should do at some point.

	Arnd



More information about the linux-arm-kernel mailing list