android_kernel_oneplus_msm8998/arch/mips/include/asm/mach-generic
Paul Burton df5314d4c2 UPSTREAM: MIPS: Support per-device DMA coherence
On some MIPS systems, a subset of devices may have DMA coherent with CPU
caches. For example in systems including a MIPS I/O Coherence Unit
(IOCU), some devices may be connected to that IOCU whilst others are
not.

Prior to this patch, we have a plat_device_is_coherent() function but no
implementation which does anything besides return a global true or
false, optionally chosen at runtime. For devices such as those described
above this is insufficient.

Fix this by tracking DMA coherence on a per-device basis with a
dma_coherent field in struct dev_archdata. Setting this from
arch_setup_dma_ops() takes care of devices which set the dma-coherent
property via device tree, and any PCI devices beneath a bridge described
in DT, automatically.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14349/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 20d330645cfb8cfecfb82b369e4d3084e429e68a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-05 08:58:32 -08:00
..
cpu-feature-overrides.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
dma-coherence.h UPSTREAM: MIPS: Support per-device DMA coherence 2018-02-05 08:58:32 -08:00
floppy.h mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
ide.h mips/ide: flush dcache also if icache does not snoop dcache 2014-01-24 22:39:56 +01:00
ioremap.h MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
irq.h MIPS/IRQCHIP: Move irq_chip from arch/mips to drivers/irqchip. 2015-06-21 21:52:50 +02:00
kernel-entry-init.h UPSTREAM: MIPS: Fix misspellings in comments. 2018-02-05 08:58:30 -08:00
kmalloc.h dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mangle-port.h MIPS: Move headfiles to new location below arch/mips/include 2008-10-11 16:18:52 +01:00
mc146818rtc.h MIPS: Move headfiles to new location below arch/mips/include 2008-10-11 16:18:52 +01:00
spaces.h MIPS: Fix KVM guest fixmap address 2015-06-21 21:53:54 +02:00
topology.h MIPS: Move headfiles to new location below arch/mips/include 2008-10-11 16:18:52 +01:00
war.h MIPS: Create a common <asm/mach-generic/war.h> 2015-03-31 11:59:40 +02:00