Lines Matching refs:pool
106 struct iommu_pool *pool; in iommu_tbl_range_alloc() local
126 pool = &(iommu->large_pool); in iommu_tbl_range_alloc()
131 pool = &(iommu->pools[pool_nr]); in iommu_tbl_range_alloc()
133 spin_lock_irqsave(&pool->lock, flags); in iommu_tbl_range_alloc()
137 (*handle >= pool->start) && (*handle < pool->end)) in iommu_tbl_range_alloc()
140 start = pool->hint; in iommu_tbl_range_alloc()
142 limit = pool->end; in iommu_tbl_range_alloc()
151 start = pool->start; in iommu_tbl_range_alloc()
160 spin_unlock(&(pool->lock)); in iommu_tbl_range_alloc()
161 pool = &(iommu->pools[0]); in iommu_tbl_range_alloc()
162 spin_lock(&(pool->lock)); in iommu_tbl_range_alloc()
163 start = pool->start; in iommu_tbl_range_alloc()
186 pool->hint = pool->start; in iommu_tbl_range_alloc()
191 spin_unlock(&(pool->lock)); in iommu_tbl_range_alloc()
193 pool = &(iommu->pools[pool_nr]); in iommu_tbl_range_alloc()
194 spin_lock(&(pool->lock)); in iommu_tbl_range_alloc()
195 pool->hint = pool->start; in iommu_tbl_range_alloc()
206 (n < pool->hint || need_flush(iommu))) { in iommu_tbl_range_alloc()
212 pool->hint = end; in iommu_tbl_range_alloc()
218 spin_unlock_irqrestore(&(pool->lock), flags); in iommu_tbl_range_alloc()
249 struct iommu_pool *pool; in iommu_tbl_range_free() local
255 pool = get_pool(iommu, entry); in iommu_tbl_range_free()
257 spin_lock_irqsave(&(pool->lock), flags); in iommu_tbl_range_free()
259 spin_unlock_irqrestore(&(pool->lock), flags); in iommu_tbl_range_free()