Lines Matching refs:rcache

865 	struct iova_rcache *rcache;  in init_iova_rcaches()  local
870 rcache = &iovad->rcaches[i]; in init_iova_rcaches()
871 spin_lock_init(&rcache->lock); in init_iova_rcaches()
872 rcache->depot_size = 0; in init_iova_rcaches()
873 rcache->cpu_rcaches = __alloc_percpu(sizeof(*cpu_rcache), cache_line_size()); in init_iova_rcaches()
874 if (WARN_ON(!rcache->cpu_rcaches)) in init_iova_rcaches()
877 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu); in init_iova_rcaches()
892 struct iova_rcache *rcache, in __iova_rcache_insert() argument
900 cpu_rcache = raw_cpu_ptr(rcache->cpu_rcaches); in __iova_rcache_insert()
912 spin_lock(&rcache->lock); in __iova_rcache_insert()
913 if (rcache->depot_size < MAX_GLOBAL_MAGS) { in __iova_rcache_insert()
914 rcache->depot[rcache->depot_size++] = in __iova_rcache_insert()
919 spin_unlock(&rcache->lock); in __iova_rcache_insert()
955 static unsigned long __iova_rcache_get(struct iova_rcache *rcache, in __iova_rcache_get() argument
963 cpu_rcache = raw_cpu_ptr(rcache->cpu_rcaches); in __iova_rcache_get()
972 spin_lock(&rcache->lock); in __iova_rcache_get()
973 if (rcache->depot_size > 0) { in __iova_rcache_get()
975 cpu_rcache->loaded = rcache->depot[--rcache->depot_size]; in __iova_rcache_get()
978 spin_unlock(&rcache->lock); in __iova_rcache_get()
1011 struct iova_rcache *rcache; in free_iova_rcaches() local
1017 rcache = &iovad->rcaches[i]; in free_iova_rcaches()
1019 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu); in free_iova_rcaches()
1023 free_percpu(rcache->cpu_rcaches); in free_iova_rcaches()
1024 for (j = 0; j < rcache->depot_size; ++j) in free_iova_rcaches()
1025 iova_magazine_free(rcache->depot[j]); in free_iova_rcaches()
1035 struct iova_rcache *rcache; in free_cpu_cached_iovas() local
1040 rcache = &iovad->rcaches[i]; in free_cpu_cached_iovas()
1041 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu); in free_cpu_cached_iovas()