Lines Matching +full:sg +full:- +full:micro
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
60 #define __IOMMU_DOMAIN_DMA_API (1U << 1) /* Domain for use in DMA-API
65 * This are the possible domain-types
67 * IOMMU_DOMAIN_BLOCKED - All DMA is blocked, can be used to isolate
69 * IOMMU_DOMAIN_IDENTITY - DMA addresses are system physical addresses
70 * IOMMU_DOMAIN_UNMANAGED - DMA mappings managed by IOMMU-API user, used
72 * IOMMU_DOMAIN_DMA - Internally used for DMA-API implementations.
101 * -aperture must be power of 2, and naturally aligned
102 * -number of windows must be power of 2, and address space size
104 * -the actual size of the mapped region of a window must be power
138 /* Software-managed MSI translation window */
143 * struct iommu_resv_region - descriptor for a reserved memory region
160 IOMMU_DEV_FEAT_AUX, /* Aux-domain feature */
164 #define IOMMU_PASID_INVALID (-1U)
169 * struct iommu_iotlb_gather - Range information for a pending IOTLB flush
176 * ->unmap() function in struct iommu_ops before eventually being passed
177 * into ->iotlb_sync().
186 * struct iommu_ops - iommu ops and capabilities
208 * @apply_resv_region: Temporary helper call-back for iova reserved ranges
217 * @aux_attach/detach_dev: aux-domain specific attach/detach entries.
218 * @aux_get_pasid: get the pasid given an aux-domain
227 * - IOMMU_DOMAIN_IDENTITY: must use an identity domain
228 * - IOMMU_DOMAIN_DMA: must use a dma domain
229 * - 0: use the default setting
281 /* Aux-domain specific attach/detach entries */
308 * struct iommu_device - IOMMU core representation of one IOMMU hardware
310 * @list: Used by the iommu-core to keep a list of registered iommus
311 * @ops: iommu-ops for talking to this iommu
322 * struct iommu_fault_event - Generic fault event
336 * struct iommu_fault_param - per-device IOMMU fault data
350 * struct dev_iommu - Collection of per-device IOMMU data
381 iommu->ops = ops; in __iommu_device_set_ops()
387 __ops->owner = THIS_MODULE; \
394 iommu->fwnode = fwnode; in iommu_device_set_fwnode()
449 struct scatterlist *sg,unsigned int nents, int prot);
451 unsigned long iova, struct scatterlist *sg,
522 if (domain->ops->flush_iotlb_all) in iommu_flush_iotlb_all()
523 domain->ops->flush_iotlb_all(domain); in iommu_flush_iotlb_all()
529 if (domain->ops->iotlb_sync) in iommu_iotlb_sync()
530 domain->ops->iotlb_sync(domain, iotlb_gather); in iommu_iotlb_sync()
546 if (gather->pgsize != size || in iommu_iotlb_gather_add_page()
547 end < gather->start || start > gather->end) { in iommu_iotlb_gather_add_page()
548 if (gather->pgsize) in iommu_iotlb_gather_add_page()
550 gather->pgsize = size; in iommu_iotlb_gather_add_page()
553 if (gather->end < end) in iommu_iotlb_gather_add_page()
554 gather->end = end; in iommu_iotlb_gather_add_page()
556 if (gather->start > start) in iommu_iotlb_gather_add_page()
557 gather->start = start; in iommu_iotlb_gather_add_page()
564 /* FSL-MC device grouping function */
568 * struct iommu_fwspec - per-device IOMMU instance data
589 * struct iommu_sva - handle to a device-mm bond
603 if (dev->iommu) in dev_iommu_fwspec_get()
604 return dev->iommu->fwspec; in dev_iommu_fwspec_get()
612 dev->iommu->fwspec = fwspec; in dev_iommu_fwspec_set()
617 return dev->iommu->priv; in dev_iommu_priv_get()
622 dev->iommu->priv = priv; in dev_iommu_priv_set()
678 return -ENODEV; in iommu_attach_device()
694 return -ENODEV; in iommu_map()
701 return -ENODEV; in iommu_map_atomic()
718 unsigned long iova, struct scatterlist *sg, in iommu_map_sg() argument
725 unsigned long iova, struct scatterlist *sg, in iommu_map_sg_atomic() argument
744 return -ENODEV; in iommu_domain_window_enable()
775 return -ENODEV; in iommu_get_group_resv_regions()
794 return -ENODEV; in iommu_attach_group()
804 return ERR_PTR(-ENODEV); in iommu_group_alloc()
821 return -ENODEV; in iommu_group_set_name()
827 return -ENODEV; in iommu_group_add_device()
838 return -ENODEV; in iommu_group_for_each_dev()
853 return -ENODEV; in iommu_group_register_notifier()
867 return -ENODEV; in iommu_register_device_fault_handler()
878 return -ENODEV; in iommu_report_device_fault()
884 return -ENODEV; in iommu_page_response()
889 return -ENODEV; in iommu_group_id()
895 return -EINVAL; in iommu_domain_get_attr()
901 return -EINVAL; in iommu_domain_set_attr()
906 return -ENODEV; in iommu_device_register()
943 return -ENODEV; in iommu_device_sysfs_add()
952 return -EINVAL; in iommu_device_link()
963 return -ENODEV; in iommu_fwspec_init()
973 return -ENODEV; in iommu_fwspec_add_ids()
997 return -ENODEV; in iommu_dev_enable_feature()
1003 return -ENODEV; in iommu_dev_disable_feature()
1009 return -ENODEV; in iommu_aux_attach_device()
1020 return -ENODEV; in iommu_aux_get_pasid()
1043 return -ENODEV; in iommu_uapi_cache_invalidate()
1049 return -ENODEV; in iommu_uapi_sva_bind_gpasid()
1055 return -ENODEV; in iommu_uapi_sva_unbind_gpasid()
1062 return -ENODEV; in iommu_sva_unbind_gpasid()
1072 * iommu_map_sgtable - Map the given buffer to the IOMMU domain
1084 return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); in iommu_map_sgtable()