Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_DMA_MAPPING_H |
| 3 | #define _ASM_X86_DMA_MAPPING_H |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 4 | |
| 5 | /* |
Mauro Carvalho Chehab | 985098a | 2020-06-23 09:09:10 +0200 | [diff] [blame] | 6 | * IOMMU interface. See Documentation/core-api/dma-api-howto.rst and |
| 7 | * Documentation/core-api/dma-api.rst for documentation. |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <linux/scatterlist.h> |
| 11 | #include <asm/io.h> |
| 12 | #include <asm/swiotlb.h> |
| 13 | |
Glauber Costa | b7107a3 | 2008-03-25 18:36:39 -0300 | [diff] [blame] | 14 | extern int iommu_merge; |
Glauber Costa | b7107a3 | 2008-03-25 18:36:39 -0300 | [diff] [blame] | 15 | extern int panic_on_overflow; |
Glauber Costa | 7c18341 | 2008-03-25 18:36:36 -0300 | [diff] [blame] | 16 | |
Bart Van Assche | 5299709 | 2017-01-20 13:04:01 -0800 | [diff] [blame] | 17 | extern const struct dma_map_ops *dma_ops; |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 18 | |
Bart Van Assche | 815dd18 | 2017-01-20 13:04:04 -0800 | [diff] [blame] | 19 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
Glauber Costa | c786df0 | 2008-03-25 18:36:37 -0300 | [diff] [blame] | 20 | { |
FUJITA Tomonori | 8d8bb39 | 2008-07-25 19:44:49 -0700 | [diff] [blame] | 21 | return dma_ops; |
FUJITA Tomonori | 8d8bb39 | 2008-07-25 19:44:49 -0700 | [diff] [blame] | 22 | } |
| 23 | |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 24 | #endif |