Lines Matching refs:mag
653 static void iova_magazine_free(struct iova_magazine *mag) in iova_magazine_free() argument
655 kfree(mag); in iova_magazine_free()
659 iova_magazine_free_pfns(struct iova_magazine *mag, struct iova_domain *iovad) in iova_magazine_free_pfns() argument
666 for (i = 0 ; i < mag->size; ++i) { in iova_magazine_free_pfns()
667 struct iova *iova = private_find_iova(iovad, mag->pfns[i]); in iova_magazine_free_pfns()
678 mag->size = 0; in iova_magazine_free_pfns()
681 static bool iova_magazine_full(struct iova_magazine *mag) in iova_magazine_full() argument
683 return mag->size == IOVA_MAG_SIZE; in iova_magazine_full()
686 static bool iova_magazine_empty(struct iova_magazine *mag) in iova_magazine_empty() argument
688 return mag->size == 0; in iova_magazine_empty()
691 static unsigned long iova_magazine_pop(struct iova_magazine *mag, in iova_magazine_pop() argument
698 for (i = mag->size - 1; mag->pfns[i] > limit_pfn; i--) in iova_magazine_pop()
703 pfn = mag->pfns[i]; in iova_magazine_pop()
704 mag->pfns[i] = mag->pfns[--mag->size]; in iova_magazine_pop()
709 static void iova_magazine_push(struct iova_magazine *mag, unsigned long pfn) in iova_magazine_push() argument
711 mag->pfns[mag->size++] = pfn; in iova_magazine_push()