blob: 24d45c78c6711658becd3ad5e82e01a4d80c03a4 [file] [log] [blame]
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +02001
2config HAS_DMA
3 bool
4 depends on !NO_DMA
5 default y
6
7config NEED_SG_DMA_LENGTH
8 bool
9
10config NEED_DMA_MAP_STATE
11 bool
12
13config ARCH_DMA_ADDR_T_64BIT
14 def_bool 64BIT || PHYS_ADDR_T_64BIT
15
Christoph Hellwigf3ecc0f2018-08-19 14:53:20 +020016config ARCH_HAS_DMA_COHERENCE_H
17 bool
18
Christoph Hellwigff4c25f2019-02-03 20:12:02 +010019config DMA_DECLARE_COHERENT
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +020020 bool
21
Christoph Hellwig347cb6a2019-01-07 13:36:20 -050022config ARCH_HAS_SETUP_DMA_OPS
23 bool
24
Christoph Hellwigdc2acde2018-12-21 22:14:44 +010025config ARCH_HAS_TEARDOWN_DMA_OPS
26 bool
27
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +020028config ARCH_HAS_SYNC_DMA_FOR_DEVICE
29 bool
30
31config ARCH_HAS_SYNC_DMA_FOR_CPU
32 bool
33 select NEED_DMA_MAP_STATE
34
Christoph Hellwig684f7e92018-09-11 08:54:57 +020035config ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
36 bool
37
Christoph Hellwig58b04402018-09-11 08:55:28 +020038config ARCH_HAS_DMA_COHERENT_TO_PFN
39 bool
40
41config ARCH_HAS_DMA_MMAP_PGPROT
42 bool
43
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +020044config DMA_NONCOHERENT_CACHE_SYNC
45 bool
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +020046
47config DMA_VIRT_OPS
48 bool
49 depends on HAS_DMA
50
51config SWIOTLB
52 bool
Christoph Hellwigcf65a0f2018-06-12 19:01:45 +020053 select NEED_DMA_MAP_STATE
Christoph Hellwigf0edfea2018-08-24 10:31:08 +020054
55config DMA_REMAP
56 depends on MMU
57 bool
Christoph Hellwig0c3b3172018-11-04 20:29:28 +010058
59config DMA_DIRECT_REMAP
60 bool
Christoph Hellwig0c3b3172018-11-04 20:29:28 +010061 select DMA_REMAP
Andy Shevchenko70ca7ba2019-02-11 18:12:30 +020062
63config DMA_API_DEBUG
64 bool "Enable debugging of DMA-API usage"
65 select NEED_DMA_MAP_STATE
66 help
67 Enable this option to debug the use of the DMA API by device drivers.
68 With this option you will be able to detect common bugs in device
69 drivers like double-freeing of DMA mappings or freeing mappings that
70 were never allocated.
71
72 This also attempts to catch cases where a page owned by DMA is
73 accessed by the cpu in a way that could cause data corruption. For
74 example, this enables cow_user_page() to check that the source page is
75 not undergoing DMA.
76
77 This option causes a performance degradation. Use only if you want to
78 debug device drivers and dma interactions.
79
80 If unsure, say N.
81
82config DMA_API_DEBUG_SG
83 bool "Debug DMA scatter-gather usage"
84 default y
85 depends on DMA_API_DEBUG
86 help
87 Perform extra checking that callers of dma_map_sg() have respected the
88 appropriate segment length/boundary limits for the given device when
89 preparing DMA scatterlists.
90
91 This is particularly likely to have been overlooked in cases where the
92 dma_map_sg() API is used for general bulk mapping of pages rather than
93 preparing literal scatter-gather descriptors, where there is a risk of
94 unexpected behaviour from DMA API implementations if the scatterlist
95 is technically out-of-spec.
96
97 If unsure, say N.