Lines Matching full:gather
373 * @gather: Range information for a pending IOTLB flush
377 struct iommu_iotlb_gather *gather; member
851 static inline void iommu_iotlb_gather_init(struct iommu_iotlb_gather *gather) in iommu_iotlb_gather_init() argument
853 *gather = (struct iommu_iotlb_gather) { in iommu_iotlb_gather_init()
855 .freelist = LIST_HEAD_INIT(gather->freelist), in iommu_iotlb_gather_init()
946 * @gather: TLB gather data
955 bool iommu_iotlb_gather_is_disjoint(struct iommu_iotlb_gather *gather, in iommu_iotlb_gather_is_disjoint() argument
960 return gather->end != 0 && in iommu_iotlb_gather_is_disjoint()
961 (end + 1 < gather->start || start > gather->end + 1); in iommu_iotlb_gather_is_disjoint()
966 * iommu_iotlb_gather_add_range - Gather for address-based TLB invalidation
967 * @gather: TLB gather data
975 static inline void iommu_iotlb_gather_add_range(struct iommu_iotlb_gather *gather, in iommu_iotlb_gather_add_range() argument
980 if (gather->start > iova) in iommu_iotlb_gather_add_range()
981 gather->start = iova; in iommu_iotlb_gather_add_range()
982 if (gather->end < end) in iommu_iotlb_gather_add_range()
983 gather->end = end; in iommu_iotlb_gather_add_range()
987 * iommu_iotlb_gather_add_page - Gather for page-based TLB invalidation
989 * @gather: TLB gather data
998 struct iommu_iotlb_gather *gather, in iommu_iotlb_gather_add_page() argument
1003 * a different granularity, then sync the TLB so that the gather in iommu_iotlb_gather_add_page()
1006 if ((gather->pgsize && gather->pgsize != size) || in iommu_iotlb_gather_add_page()
1007 iommu_iotlb_gather_is_disjoint(gather, iova, size)) in iommu_iotlb_gather_add_page()
1008 iommu_iotlb_sync(domain, gather); in iommu_iotlb_gather_add_page()
1010 gather->pgsize = size; in iommu_iotlb_gather_add_page()
1011 iommu_iotlb_gather_add_range(gather, iova, size); in iommu_iotlb_gather_add_page()
1014 static inline bool iommu_iotlb_gather_queued(struct iommu_iotlb_gather *gather) in iommu_iotlb_gather_queued() argument
1016 return gather && gather->queued; in iommu_iotlb_gather_queued()
1021 struct iommu_iotlb_gather *gather) in iommu_dirty_bitmap_init() argument
1023 if (gather) in iommu_dirty_bitmap_init()
1024 iommu_iotlb_gather_init(gather); in iommu_dirty_bitmap_init()
1027 dirty->gather = gather; in iommu_dirty_bitmap_init()
1037 if (dirty->gather) in iommu_dirty_bitmap_record()
1038 iommu_iotlb_gather_add_range(dirty->gather, iova, length); in iommu_dirty_bitmap_record()
1349 static inline void iommu_iotlb_gather_init(struct iommu_iotlb_gather *gather) in iommu_iotlb_gather_init() argument
1354 struct iommu_iotlb_gather *gather, in iommu_iotlb_gather_add_page() argument
1359 static inline bool iommu_iotlb_gather_queued(struct iommu_iotlb_gather *gather) in iommu_iotlb_gather_queued() argument
1366 struct iommu_iotlb_gather *gather) in iommu_dirty_bitmap_init() argument