linux/arch
Marek Szyprowski a227fb92a0 ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops
This patch removes the need for the offset parameter in dma bounce
functions. This is required to let dma-mapping framework on ARM
architecture to use common, generic dma_map_ops based dma-mapping
helpers.

Background and more detailed explaination:

dma_*_range_* functions are available from the early days of the dma
mapping api. They are the correct way of doing a partial syncs on the
buffer (usually used by the network device drivers). This patch changes
only the internal implementation of the dma bounce functions to let
them tunnel through dma_map_ops structure. The driver api stays
unchanged, so driver are obliged to call dma_*_range_* functions to
keep code clean and easy to understand.

The only drawback from this patch is reduced detection of the dma api
abuse. Let us consider the following code:

dma_addr = dma_map_single(dev, ptr, 64, DMA_TO_DEVICE);
dma_sync_single_range_for_cpu(dev, dma_addr+16, 0, 32, DMA_TO_DEVICE);

Without the patch such code fails, because dma bounce code is unable
to find the bounce buffer for the given dma_address. After the patch
the above sync call will be equivalent to:

dma_sync_single_range_for_cpu(dev, dma_addr, 16, 32, DMA_TO_DEVICE);

which succeeds.

I don't consider this as a real problem, because DMA API abuse should be
caught by debug_dma_* function family. This patch lets us to simplify
the internal low-level implementation without chaning the driver visible
API.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:13 +02:00
..
alpha alpha: silence 'const' warning in sys_marvel.c 2012-05-02 15:54:06 -04:00
arm ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops 2012-05-21 15:06:13 +02:00
avr32
blackfin blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c 2012-04-26 14:46:51 -04:00
c6x
cris
frv frv: delete incorrect task prototypes causing compile fail 2012-05-17 18:00:51 -07:00
h8300
hexagon hexagon: add missing cpu.h include 2012-04-23 12:57:24 -05:00
ia64 KVM: ia64: fix build due to typo 2012-05-09 13:53:28 +03:00
m32r
m68k m68knommu: enable qspi support when SPI_COLDFIRE_QSPI = m 2012-05-08 13:06:51 +10:00
microblaze
mips MIPS: Remove get_current_pgd(). 2012-04-27 17:16:29 +01:00
mn10300 mn10300/CPU hotplug: Add missing call to notify_cpu_starting() 2012-05-15 18:16:57 -07:00
openrisc
parisc [PARISC] fix panic on prefetch(NULL) on PA7300LC 2012-05-16 13:15:21 +01:00
powerpc KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates 2012-05-16 15:02:12 +02:00
s390
score
sh sh: Fix up tracepoint build fallout from static key introduction. 2012-04-27 11:12:38 +09:30
sparc sparc64: Do not clobber %g2 in xcall_fetch_glob_regs(). 2012-05-10 11:00:46 -07:00
tile tilegx: enable SYSCALL_WRAPPERS support 2012-05-18 13:33:24 -04:00
um
unicore32
x86 Merge branch 'x86/ld-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-19 15:28:22 -07:00
xtensa xtensa: fix build fail on undefined ack_bad_irq 2012-04-26 18:35:32 -04:00
.gitignore
Kconfig