linux-stable/arch
Jim Quinlan e0d072782c dma-mapping: introduce DMA range map, supplanting dma_pfn_offset
The new field 'dma_range_map' in struct device is used to facilitate the
use of single or multiple offsets between mapping regions of cpu addrs and
dma addrs.  It subsumes the role of "dev->dma_pfn_offset" which was only
capable of holding a single uniform offset and had no region bounds
checking.

The function of_dma_get_range() has been modified so that it takes a single
argument -- the device node -- and returns a map, NULL, or an error code.
The map is an array that holds the information regarding the DMA regions.
Each range entry contains the address offset, the cpu_start address, the
dma_start address, and the size of the region.

of_dma_configure() is the typical manner to set range offsets but there are
a number of ad hoc assignments to "dev->dma_pfn_offset" in the kernel
driver code.  These cases now invoke the function
dma_direct_set_offset(dev, cpu_addr, dma_addr, size).

Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
[hch: various interface cleanups]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
2020-09-17 18:43:56 +02:00
..
alpha dma-mapping: introduce dma_get_seg_boundary_nr_pages() 2020-09-03 18:12:15 +02:00
arc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arm dma-mapping: introduce DMA range map, supplanting dma_pfn_offset 2020-09-17 18:43:56 +02:00
arm64 arm64: mm: reserve per-numa CMA to localize coherent dma buffers 2020-09-01 09:19:37 +02:00
c6x treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
csky treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
h8300 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hexagon treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ia64 dma-mapping: add (back) arch_dma_mark_clean for ia64 2020-09-11 09:10:17 +02:00
m68k treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
microblaze treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mips dma-direct: rename and cleanup __phys_to_dma 2020-09-11 09:14:43 +02:00
nds32 A set of fixes for lockdep, tracing and RCU: 2020-08-30 11:43:50 -07:00
nios2 mm/nios2: use general page fault accounting 2020-08-12 10:58:03 -07:00
openrisc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
parisc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
powerpc dma-direct: rename and cleanup __phys_to_dma 2020-09-11 09:14:43 +02:00
riscv treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 dma-mapping: introduce dma_get_seg_boundary_nr_pages() 2020-09-03 18:12:15 +02:00
sh dma-mapping: introduce DMA range map, supplanting dma_pfn_offset 2020-09-17 18:43:56 +02:00
sparc dma-mapping: introduce dma_get_seg_boundary_nr_pages() 2020-09-03 18:12:15 +02:00
um treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x86 dma-mapping: introduce DMA range map, supplanting dma_pfn_offset 2020-09-17 18:43:56 +02:00
xtensa treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
.gitignore
Kconfig A set oftimekeeping/VDSO updates: 2020-08-14 14:26:08 -07:00