xen-ops.h 406 B

123456789101112131415161718
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_ARM_XEN_OPS_H
  3. #define _ASM_ARM_XEN_OPS_H
  4. #include <xen/swiotlb-xen.h>
  5. #include <xen/xen-ops.h>
  6. static inline void xen_setup_dma_ops(struct device *dev)
  7. {
  8. #ifdef CONFIG_XEN
  9. if (xen_is_grant_dma_device(dev))
  10. xen_grant_setup_dma_ops(dev);
  11. else if (xen_swiotlb_detect())
  12. dev->dma_ops = &xen_swiotlb_dma_ops;
  13. #endif
  14. }
  15. #endif /* _ASM_ARM_XEN_OPS_H */