Lines Matching +full:sg +full:- +full:micro
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
36 * the last-level or system cache, with a read/write allocation policy.
42 * the last-level or system cache, with a read allocation policy.
72 #define __IOMMU_DOMAIN_DMA_API (1U << 1) /* Domain for use in DMA-API
77 * This are the possible domain-types
79 * IOMMU_DOMAIN_BLOCKED - All DMA is blocked, can be used to isolate
81 * IOMMU_DOMAIN_IDENTITY - DMA addresses are system physical addresses
82 * IOMMU_DOMAIN_UNMANAGED - DMA mappings managed by IOMMU-API user, used
84 * IOMMU_DOMAIN_DMA - Internally used for DMA-API implementations.
113 * -aperture must be power of 2, and naturally aligned
114 * -number of windows must be power of 2, and address space size
116 * -the actual size of the mapped region of a window must be power
150 /* Software-managed MSI translation window */
155 * struct iommu_resv_region - descriptor for a reserved memory region
172 IOMMU_DEV_FEAT_AUX, /* Aux-domain feature */
176 #define IOMMU_PASID_INVALID (-1U)
181 * struct iommu_iotlb_gather - Range information for a pending IOTLB flush
188 * ->unmap() function in struct iommu_ops before eventually being passed
189 * into ->iotlb_sync().
198 * struct iommu_ops - iommu ops and capabilities
207 * @map_sg: map a scatter-gather list of physically contiguous chunks to
225 * @apply_resv_region: Temporary helper call-back for iova reserved ranges
234 * @aux_attach/detach_dev: aux-domain specific attach/detach entries.
235 * @aux_get_pasid: get the pasid given an aux-domain
244 * - IOMMU_DOMAIN_IDENTITY: must use an identity domain
245 * - IOMMU_DOMAIN_DMA: must use a dma domain
246 * - 0: use the default setting
265 struct scatterlist *sg, unsigned int nents, int prot,
308 /* Aux-domain specific attach/detach entries */
335 * struct iommu_device - IOMMU core representation of one IOMMU hardware
337 * @list: Used by the iommu-core to keep a list of registered iommus
338 * @ops: iommu-ops for talking to this iommu
349 * struct iommu_fault_event - Generic fault event
363 * struct iommu_fault_param - per-device IOMMU fault data
377 * struct dev_iommu - Collection of per-device IOMMU data
408 iommu->ops = ops; in __iommu_device_set_ops()
414 __ops->owner = THIS_MODULE; \
421 iommu->fwnode = fwnode; in iommu_device_set_fwnode()
476 struct scatterlist *sg,unsigned int nents, int prot);
478 unsigned long iova, struct scatterlist *sg,
549 if (domain->ops->flush_iotlb_all) in iommu_flush_iotlb_all()
550 domain->ops->flush_iotlb_all(domain); in iommu_flush_iotlb_all()
556 if (domain->ops->iotlb_sync) in iommu_iotlb_sync()
557 domain->ops->iotlb_sync(domain, iotlb_gather); in iommu_iotlb_sync()
566 unsigned long start = iova, end = start + size - 1; in iommu_iotlb_gather_add_page()
573 if (gather->pgsize != size || in iommu_iotlb_gather_add_page()
574 end + 1 < gather->start || start > gather->end + 1) { in iommu_iotlb_gather_add_page()
575 if (gather->pgsize) in iommu_iotlb_gather_add_page()
577 gather->pgsize = size; in iommu_iotlb_gather_add_page()
580 if (gather->end < end) in iommu_iotlb_gather_add_page()
581 gather->end = end; in iommu_iotlb_gather_add_page()
583 if (gather->start > start) in iommu_iotlb_gather_add_page()
584 gather->start = start; in iommu_iotlb_gather_add_page()
591 /* FSL-MC device grouping function */
595 * struct iommu_fwspec - per-device IOMMU instance data
616 * struct iommu_sva - handle to a device-mm bond
630 if (dev->iommu) in dev_iommu_fwspec_get()
631 return dev->iommu->fwspec; in dev_iommu_fwspec_get()
639 dev->iommu->fwspec = fwspec; in dev_iommu_fwspec_set()
644 if (dev->iommu) in dev_iommu_priv_get()
645 return dev->iommu->priv; in dev_iommu_priv_get()
652 dev->iommu->priv = priv; in dev_iommu_priv_set()
708 return -ENODEV; in iommu_attach_device()
724 return -ENODEV; in iommu_map()
731 return -ENODEV; in iommu_map_atomic()
748 unsigned long iova, struct scatterlist *sg, in iommu_map_sg() argument
755 unsigned long iova, struct scatterlist *sg, in iommu_map_sg_atomic() argument
774 return -ENODEV; in iommu_domain_window_enable()
805 return -ENODEV; in iommu_get_group_resv_regions()
824 return -ENODEV; in iommu_attach_group()
834 return ERR_PTR(-ENODEV); in iommu_group_alloc()
851 return -ENODEV; in iommu_group_set_name()
857 return -ENODEV; in iommu_group_add_device()
868 return -ENODEV; in iommu_group_for_each_dev()
883 return -ENODEV; in iommu_group_register_notifier()
897 return -ENODEV; in iommu_register_device_fault_handler()
908 return -ENODEV; in iommu_report_device_fault()
914 return -ENODEV; in iommu_page_response()
919 return -ENODEV; in iommu_group_id()
925 return -EINVAL; in iommu_domain_get_attr()
931 return -EINVAL; in iommu_domain_set_attr()
936 return -ENODEV; in iommu_device_register()
973 return -ENODEV; in iommu_device_sysfs_add()
982 return -EINVAL; in iommu_device_link()
993 return -ENODEV; in iommu_fwspec_init()
1003 return -ENODEV; in iommu_fwspec_add_ids()
1027 return -ENODEV; in iommu_dev_enable_feature()
1033 return -ENODEV; in iommu_dev_disable_feature()
1039 return -ENODEV; in iommu_aux_attach_device()
1050 return -ENODEV; in iommu_aux_get_pasid()
1073 return -ENODEV; in iommu_uapi_cache_invalidate()
1079 return -ENODEV; in iommu_uapi_sva_bind_gpasid()
1085 return -ENODEV; in iommu_uapi_sva_unbind_gpasid()
1092 return -ENODEV; in iommu_sva_unbind_gpasid()
1102 * iommu_map_sgtable - Map the given buffer to the IOMMU domain
1114 return iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, prot); in iommu_map_sgtable()