dma-mapping.h 824 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_DMA_MAPPING_H
  3. #define _ASM_X86_DMA_MAPPING_H
  4. /*
  5. * IOMMU interface. See Documentation/DMA-API-HOWTO.txt and
  6. * Documentation/DMA-API.txt for documentation.
  7. */
  8. #include <linux/scatterlist.h>
  9. #include <linux/dma-debug.h>
  10. #include <asm/io.h>
  11. #include <asm/swiotlb.h>
  12. #include <linux/dma-contiguous.h>
  13. #ifdef CONFIG_ISA
  14. # define ISA_DMA_BIT_MASK DMA_BIT_MASK(24)
  15. #else
  16. # define ISA_DMA_BIT_MASK DMA_BIT_MASK(32)
  17. #endif
  18. extern int iommu_merge;
  19. extern struct device x86_dma_fallback_dev;
  20. extern int panic_on_overflow;
  21. extern const struct dma_map_ops *dma_ops;
  22. static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
  23. {
  24. return dma_ops;
  25. }
  26. bool arch_dma_alloc_attrs(struct device **dev);
  27. #define arch_dma_alloc_attrs arch_dma_alloc_attrs
  28. #endif