summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEugeniy Paltsev2018-07-30 18:26:34 +0200
committerVineet Gupta2018-09-04 22:21:37 +0200
commit2820a708d5a321342bef34e459fdc8679c30e20f (patch)
treed5118dc16437fa15bf7361eebd70a65ceda92722 /kernel
parentARC: dma [IOC]: mark DMA devices connected as dma-coherent (diff)
downloadkernel-qcow2-linux-2820a708d5a321342bef34e459fdc8679c30e20f.tar.gz
kernel-qcow2-linux-2820a708d5a321342bef34e459fdc8679c30e20f.tar.xz
kernel-qcow2-linux-2820a708d5a321342bef34e459fdc8679c30e20f.zip
ARC: dma [IOC] Enable per device io coherency
So far the IOC treatment was global on ARC, being turned on (or off) for all devices in the system. With this patch, this can now be done per device using the "dma-coherent" DT property; IOW with this patch we can use both HW-coherent and regular DMA peripherals simultaneously. The changes involved are too many so enlisting the summary below: 1. common code calls ARC arch_setup_dma_ops() per device. 2. For coherent dma (IOC) it plugs in generic @dma_direct_ops which doesn't need any arch specific backend: No need for any explicit cache flushes or MMU mappings to provide for uncached access - dma_(map|sync)_single* return early as corresponding dma ops callbacks are NULL in generic code. So arch_sync_dma_*() -> dma_cache_*() need not handle the coherent dma case, hence drop ARC __dma_cache_*_ioc() which were no-op anyways 3. For noncoherent dma (non IOC) generic @dma_noncoherent_ops is used which in turns calls ARC specific routines - arch_dma_alloc() no longer checks for @ioc_enable since this is called only for !IOC case. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> [vgupta: rewrote changelog]
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions