diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 14:29:17 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 14:29:17 -0400 |
| commit | befa93633193e5327e4045d1e5fa29114580fa5d (patch) | |
| tree | 98783e84f9c9d2b7816ca954e017b197975a5e6f /include/linux | |
| parent | d1f2b1710d92a80d60351503bbf41cdac95ed7a8 (diff) | |
| parent | 886643b766321f15f63bd950be618cbb6dd22bbc (diff) | |
Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping
Pull more dma-mapping updates from Christoph Hellwig:
- various swiotlb cleanups
- do not dip into the ѕwiotlb pool for dma coherent allocations
- add support for not cache coherent DMA to swiotlb
- switch ARM64 to use the generic swiotlb_dma_ops
* tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping:
arm64: use the generic swiotlb_dma_ops
swiotlb: add support for non-coherent DMA
swiotlb: don't dip into swiotlb pool for coherent allocations
swiotlb: refactor swiotlb_map_page
swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs
swiotlb: merge swiotlb_unmap_page and unmap_single
swiotlb: remove the overflow buffer
swiotlb: do not panic on mapping failures
swiotlb: mark is_swiotlb_buffer static
swiotlb: remove a pointless comment
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-direct.h | 2 | ||||
| -rw-r--r-- | include/linux/swiotlb.h | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h index fbca184ff5a0..bd73e7a91410 100644 --- a/include/linux/dma-direct.h +++ b/include/linux/dma-direct.h | |||
| @@ -5,6 +5,8 @@ | |||
| 5 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
| 6 | #include <linux/mem_encrypt.h> | 6 | #include <linux/mem_encrypt.h> |
| 7 | 7 | ||
| 8 | #define DIRECT_MAPPING_ERROR 0 | ||
| 9 | |||
| 8 | #ifdef CONFIG_ARCH_HAS_PHYS_TO_DMA | 10 | #ifdef CONFIG_ARCH_HAS_PHYS_TO_DMA |
| 9 | #include <asm/dma-direct.h> | 11 | #include <asm/dma-direct.h> |
| 10 | #else | 12 | #else |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 965be92c33b5..a387b59640a4 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
| @@ -67,11 +67,6 @@ extern void swiotlb_tbl_sync_single(struct device *hwdev, | |||
| 67 | 67 | ||
| 68 | /* Accessory functions. */ | 68 | /* Accessory functions. */ |
| 69 | 69 | ||
| 70 | void *swiotlb_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle, | ||
| 71 | gfp_t flags, unsigned long attrs); | ||
| 72 | void swiotlb_free(struct device *dev, size_t size, void *vaddr, | ||
| 73 | dma_addr_t dma_addr, unsigned long attrs); | ||
| 74 | |||
| 75 | extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, | 70 | extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, |
| 76 | unsigned long offset, size_t size, | 71 | unsigned long offset, size_t size, |
| 77 | enum dma_data_direction dir, | 72 | enum dma_data_direction dir, |
| @@ -107,9 +102,6 @@ swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | |||
| 107 | int nelems, enum dma_data_direction dir); | 102 | int nelems, enum dma_data_direction dir); |
| 108 | 103 | ||
| 109 | extern int | 104 | extern int |
| 110 | swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); | ||
| 111 | |||
| 112 | extern int | ||
| 113 | swiotlb_dma_supported(struct device *hwdev, u64 mask); | 105 | swiotlb_dma_supported(struct device *hwdev, u64 mask); |
| 114 | 106 | ||
| 115 | #ifdef CONFIG_SWIOTLB | 107 | #ifdef CONFIG_SWIOTLB |
| @@ -121,7 +113,6 @@ static inline unsigned int swiotlb_max_segment(void) { return 0; } | |||
| 121 | #endif | 113 | #endif |
| 122 | 114 | ||
| 123 | extern void swiotlb_print_info(void); | 115 | extern void swiotlb_print_info(void); |
| 124 | extern int is_swiotlb_buffer(phys_addr_t paddr); | ||
| 125 | extern void swiotlb_set_max_segment(unsigned int); | 116 | extern void swiotlb_set_max_segment(unsigned int); |
| 126 | 117 | ||
| 127 | extern const struct dma_map_ops swiotlb_dma_ops; | 118 | extern const struct dma_map_ops swiotlb_dma_ops; |
