Commit | Line | Data |
---|---|---|
b2441318 | 1 | // SPDX-License-Identifier: GPL-2.0 |
4d9b977c | 2 | #include <linux/dma-mapping.h> |
bd3ff194 | 3 | #include <linux/export.h> |
4d9b977c | 4 | |
fb446727 FT |
5 | /* Set this to 1 if there is a HW IOMMU in the system */ |
6 | int iommu_detected __read_mostly; | |
7 | ||
5299709d | 8 | const struct dma_map_ops *dma_ops; |
4d9b977c | 9 | EXPORT_SYMBOL(dma_ops); |
c190ab0b | 10 | |
390bd132 | 11 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) |
12 | ||
13 | static int __init dma_init(void) | |
14 | { | |
f2486f26 LT |
15 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); |
16 | ||
17 | return 0; | |
390bd132 | 18 | } |
19 | fs_initcall(dma_init); | |
20 | ||
5299709d | 21 | const struct dma_map_ops *dma_get_ops(struct device *dev) |
c190ab0b FT |
22 | { |
23 | return dma_ops; | |
24 | } | |
25 | EXPORT_SYMBOL(dma_get_ops); |