Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 1 | |
| 2 | config HAS_DMA |
| 3 | bool |
| 4 | depends on !NO_DMA |
| 5 | default y |
| 6 | |
| 7 | config NEED_SG_DMA_LENGTH |
| 8 | bool |
| 9 | |
| 10 | config NEED_DMA_MAP_STATE |
| 11 | bool |
| 12 | |
| 13 | config ARCH_DMA_ADDR_T_64BIT |
| 14 | def_bool 64BIT || PHYS_ADDR_T_64BIT |
| 15 | |
Christoph Hellwig | f3ecc0f | 2018-08-19 14:53:20 +0200 | [diff] [blame] | 16 | config ARCH_HAS_DMA_COHERENCE_H |
| 17 | bool |
| 18 | |
Christoph Hellwig | ff4c25f | 2019-02-03 20:12:02 +0100 | [diff] [blame^] | 19 | config DMA_DECLARE_COHERENT |
Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 20 | bool |
| 21 | |
Christoph Hellwig | 347cb6a | 2019-01-07 13:36:20 -0500 | [diff] [blame] | 22 | config ARCH_HAS_SETUP_DMA_OPS |
| 23 | bool |
| 24 | |
Christoph Hellwig | dc2acde | 2018-12-21 22:14:44 +0100 | [diff] [blame] | 25 | config ARCH_HAS_TEARDOWN_DMA_OPS |
| 26 | bool |
| 27 | |
Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 28 | config ARCH_HAS_SYNC_DMA_FOR_DEVICE |
| 29 | bool |
| 30 | |
| 31 | config ARCH_HAS_SYNC_DMA_FOR_CPU |
| 32 | bool |
| 33 | select NEED_DMA_MAP_STATE |
| 34 | |
Christoph Hellwig | 684f7e9 | 2018-09-11 08:54:57 +0200 | [diff] [blame] | 35 | config ARCH_HAS_SYNC_DMA_FOR_CPU_ALL |
| 36 | bool |
| 37 | |
Christoph Hellwig | 58b0440 | 2018-09-11 08:55:28 +0200 | [diff] [blame] | 38 | config ARCH_HAS_DMA_COHERENT_TO_PFN |
| 39 | bool |
| 40 | |
| 41 | config ARCH_HAS_DMA_MMAP_PGPROT |
| 42 | bool |
| 43 | |
Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 44 | config DMA_NONCOHERENT_CACHE_SYNC |
| 45 | bool |
Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 46 | |
| 47 | config DMA_VIRT_OPS |
| 48 | bool |
| 49 | depends on HAS_DMA |
| 50 | |
| 51 | config SWIOTLB |
| 52 | bool |
Christoph Hellwig | cf65a0f | 2018-06-12 19:01:45 +0200 | [diff] [blame] | 53 | select NEED_DMA_MAP_STATE |
Christoph Hellwig | f0edfea | 2018-08-24 10:31:08 +0200 | [diff] [blame] | 54 | |
| 55 | config DMA_REMAP |
| 56 | depends on MMU |
| 57 | bool |
Christoph Hellwig | 0c3b317 | 2018-11-04 20:29:28 +0100 | [diff] [blame] | 58 | |
| 59 | config DMA_DIRECT_REMAP |
| 60 | bool |
Christoph Hellwig | 0c3b317 | 2018-11-04 20:29:28 +0100 | [diff] [blame] | 61 | select DMA_REMAP |
Andy Shevchenko | 70ca7ba | 2019-02-11 18:12:30 +0200 | [diff] [blame] | 62 | |
| 63 | config 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 | |
| 82 | config 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. |