tmp_suning_uos_patched/kernel/dma
Nicolas Saenz Julienne a7ba70f178 dma-mapping: treat dev->bus_dma_mask as a DMA limit
Using a mask to represent bus DMA constraints has a set of limitations.
The biggest one being it can only hold a power of two (minus one). The
DMA mapping code is already aware of this and treats dev->bus_dma_mask
as a limit. This quirk is already used by some architectures although
still rare.

With the introduction of the Raspberry Pi 4 we've found a new contender
for the use of bus DMA limits, as its PCIe bus can only address the
lower 3GB of memory (of a total of 4GB). This is impossible to represent
with a mask. To make things worse the device-tree code rounds non power
of two bus DMA limits to the next power of two, which is unacceptable in
this case.

In the light of this, rename dev->bus_dma_mask to dev->bus_dma_limit all
over the tree and treat it as such. Note that dev->bus_dma_limit should
contain the higher accessible DMA address.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-11-21 18:14:35 +01:00
..
coherent.c dma-mapping: fix handling of dma-ranges for reserved memory (again) 2019-10-30 11:07:35 -07:00
contiguous.c kernel: dma-contiguous: mark CMA parameters __initdata/__initconst 2019-10-30 11:10:45 -07:00
debug.c dma-debug: clean up put_hash_bucket() 2019-11-20 20:31:41 +01:00
direct.c dma-mapping: treat dev->bus_dma_mask as a DMA limit 2019-11-21 18:14:35 +01:00
dummy.c dma-mapping: factor out dummy DMA ops 2018-12-13 21:06:12 +01:00
Kconfig dma-direct: provide mmap and get_sgtable method overrides 2019-11-11 10:52:15 +01:00
Makefile dma-mapping: improve selection of dma_declare_coherent availability 2019-02-20 07:26:35 -07:00
mapping.c dma-direct: provide mmap and get_sgtable method overrides 2019-11-11 10:52:15 +01:00
remap.c dma-mapping: merge the generic remapping helpers into dma-direct 2019-11-11 10:52:18 +01:00
swiotlb.c dma-direct: exclude dma_direct_map_resource from the min_low_pfn check 2019-11-20 20:31:41 +01:00
virt.c dma-mapping: zero memory returned from dma_alloc_* 2018-12-20 08:13:52 +01:00