Lines Matching refs:cpu_rcache

732 		struct iova_cpu_rcache *cpu_rcache;
738 rcache->cpu_rcaches = __alloc_percpu(sizeof(*cpu_rcache),
745 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu);
747 spin_lock_init(&cpu_rcache->lock);
748 cpu_rcache->loaded = iova_magazine_alloc(GFP_KERNEL);
749 cpu_rcache->prev = iova_magazine_alloc(GFP_KERNEL);
750 if (!cpu_rcache->loaded || !cpu_rcache->prev) {
780 struct iova_cpu_rcache *cpu_rcache;
784 cpu_rcache = raw_cpu_ptr(rcache->cpu_rcaches);
785 spin_lock_irqsave(&cpu_rcache->lock, flags);
787 if (!iova_magazine_full(cpu_rcache->loaded)) {
789 } else if (!iova_magazine_full(cpu_rcache->prev)) {
790 swap(cpu_rcache->prev, cpu_rcache->loaded);
799 cpu_rcache->loaded;
801 mag_to_free = cpu_rcache->loaded;
805 cpu_rcache->loaded = new_mag;
811 iova_magazine_push(cpu_rcache->loaded, iova_pfn);
813 spin_unlock_irqrestore(&cpu_rcache->lock, flags);
842 struct iova_cpu_rcache *cpu_rcache;
847 cpu_rcache = raw_cpu_ptr(rcache->cpu_rcaches);
848 spin_lock_irqsave(&cpu_rcache->lock, flags);
850 if (!iova_magazine_empty(cpu_rcache->loaded)) {
852 } else if (!iova_magazine_empty(cpu_rcache->prev)) {
853 swap(cpu_rcache->prev, cpu_rcache->loaded);
858 iova_magazine_free(cpu_rcache->loaded);
859 cpu_rcache->loaded = rcache->depot[--rcache->depot_size];
866 iova_pfn = iova_magazine_pop(cpu_rcache->loaded, limit_pfn);
868 spin_unlock_irqrestore(&cpu_rcache->lock, flags);
896 struct iova_cpu_rcache *cpu_rcache;
905 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu);
906 iova_magazine_free(cpu_rcache->loaded);
907 iova_magazine_free(cpu_rcache->prev);
923 struct iova_cpu_rcache *cpu_rcache;
930 cpu_rcache = per_cpu_ptr(rcache->cpu_rcaches, cpu);
931 spin_lock_irqsave(&cpu_rcache->lock, flags);
932 iova_magazine_free_pfns(cpu_rcache->loaded, iovad);
933 iova_magazine_free_pfns(cpu_rcache->prev, iovad);
934 spin_unlock_irqrestore(&cpu_rcache->lock, flags);