swiotlb.h 952 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _ASM_X86_SWIOTLB_H
  2. #define _ASM_X86_SWIOTLB_H
  3. #include <linux/swiotlb.h>
  4. #ifdef CONFIG_SWIOTLB
  5. extern int swiotlb;
  6. extern int __init pci_swiotlb_detect_override(void);
  7. extern int __init pci_swiotlb_detect_4gb(void);
  8. extern void __init pci_swiotlb_init(void);
  9. extern void __init pci_swiotlb_late_init(void);
  10. #else
  11. #define swiotlb 0
  12. static inline int pci_swiotlb_detect_override(void)
  13. {
  14. return 0;
  15. }
  16. static inline int pci_swiotlb_detect_4gb(void)
  17. {
  18. return 0;
  19. }
  20. static inline void pci_swiotlb_init(void)
  21. {
  22. }
  23. static inline void pci_swiotlb_late_init(void)
  24. {
  25. }
  26. #endif
  27. static inline void dma_mark_clean(void *addr, size_t size) {}
  28. extern void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
  29. dma_addr_t *dma_handle, gfp_t flags,
  30. unsigned long attrs);
  31. extern void x86_swiotlb_free_coherent(struct device *dev, size_t size,
  32. void *vaddr, dma_addr_t dma_addr,
  33. unsigned long attrs);
  34. #endif /* _ASM_X86_SWIOTLB_H */