mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
58b0440663
The only functional differences (modulo a few missing fixes in the arch code) is that architectures without coherent caches need a hook to convert a virtual or dma address into a pfn, given that we don't have the kernel linear mapping available for the otherwise easy virt_to_page call. As a side effect we can support mmap of the per-device coherent area even on architectures not providing the callback, and we make previous dangerous default methods dma_common_mmap actually save for non-coherent architectures by rejecting it without the right helper. In addition to that we need a hook so that some architectures can override the protection bits when mmaping a dma coherent allocations. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
54 lines
737 B
Plaintext
54 lines
737 B
Plaintext
|
|
config HAS_DMA
|
|
bool
|
|
depends on !NO_DMA
|
|
default y
|
|
|
|
config NEED_SG_DMA_LENGTH
|
|
bool
|
|
|
|
config NEED_DMA_MAP_STATE
|
|
bool
|
|
|
|
config ARCH_DMA_ADDR_T_64BIT
|
|
def_bool 64BIT || PHYS_ADDR_T_64BIT
|
|
|
|
config ARCH_HAS_DMA_COHERENCE_H
|
|
bool
|
|
|
|
config HAVE_GENERIC_DMA_COHERENT
|
|
bool
|
|
|
|
config ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
|
bool
|
|
|
|
config ARCH_HAS_SYNC_DMA_FOR_CPU
|
|
bool
|
|
select NEED_DMA_MAP_STATE
|
|
|
|
config ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
|
|
bool
|
|
|
|
config ARCH_HAS_DMA_COHERENT_TO_PFN
|
|
bool
|
|
|
|
config ARCH_HAS_DMA_MMAP_PGPROT
|
|
bool
|
|
|
|
config DMA_DIRECT_OPS
|
|
bool
|
|
depends on HAS_DMA
|
|
|
|
config DMA_NONCOHERENT_CACHE_SYNC
|
|
bool
|
|
depends on DMA_DIRECT_OPS
|
|
|
|
config DMA_VIRT_OPS
|
|
bool
|
|
depends on HAS_DMA
|
|
|
|
config SWIOTLB
|
|
bool
|
|
select DMA_DIRECT_OPS
|
|
select NEED_DMA_MAP_STATE
|