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 | /* | ||||
Paul Bolle | 395cf96 | 2011-08-15 02:02:26 +0200 | [diff] [blame] | 6 | * IOMMU interface. See Documentation/DMA-API-HOWTO.txt and |
Randy Dunlap | 5872fb9 | 2009-01-29 16:28:02 -0800 | [diff] [blame] | 7 | * Documentation/DMA-API.txt for documentation. |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 8 | */ |
9 | |||||
10 | #include <linux/scatterlist.h> | ||||
Joerg Roedel | 2118d0c | 2009-01-09 15:13:15 +0100 | [diff] [blame] | 11 | #include <linux/dma-debug.h> |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 12 | #include <asm/io.h> |
13 | #include <asm/swiotlb.h> | ||||
Marek Szyprowski | 0a2b9a6 | 2011-12-29 13:09:51 +0100 | [diff] [blame] | 14 | #include <linux/dma-contiguous.h> |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 15 | |
Glauber Costa | b7107a3 | 2008-03-25 18:36:39 -0300 | [diff] [blame] | 16 | extern int iommu_merge; |
Glauber Costa | b7107a3 | 2008-03-25 18:36:39 -0300 | [diff] [blame] | 17 | extern int panic_on_overflow; |
Glauber Costa | 7c18341 | 2008-03-25 18:36:36 -0300 | [diff] [blame] | 18 | |
Bart Van Assche | 5299709 | 2017-01-20 13:04:01 -0800 | [diff] [blame] | 19 | extern const struct dma_map_ops *dma_ops; |
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 20 | |
Bart Van Assche | 815dd18 | 2017-01-20 13:04:04 -0800 | [diff] [blame] | 21 | 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] | 22 | { |
FUJITA Tomonori | 8d8bb39 | 2008-07-25 19:44:49 -0700 | [diff] [blame] | 23 | return dma_ops; |
FUJITA Tomonori | 8d8bb39 | 2008-07-25 19:44:49 -0700 | [diff] [blame] | 24 | } |
25 | |||||
Glauber Costa | 6f53663 | 2008-03-25 18:36:20 -0300 | [diff] [blame] | 26 | #endif |