Lines Matching refs:qpn
305 u32 i, offset, max_scan, qpn; in alloc_qpn() local
326 qpn = qpt->last + qpt->incr; in alloc_qpn()
327 if (qpn >= RVT_QPN_MAX) in alloc_qpn()
328 qpn = qpt->incr | ((qpt->last & 1) ^ 1); in alloc_qpn()
330 offset = qpn & RVT_BITS_PER_PAGE_MASK; in alloc_qpn()
331 map = &qpt->map[qpn / RVT_BITS_PER_PAGE]; in alloc_qpn()
341 qpt->last = qpn; in alloc_qpn()
342 ret = qpn; in alloc_qpn()
350 qpn = mk_qpn(qpt, map, offset); in alloc_qpn()
351 } while (offset < RVT_BITS_PER_PAGE && qpn < RVT_QPN_MAX); in alloc_qpn()
374 qpn = mk_qpn(qpt, map, offset); in alloc_qpn()
383 static void free_qpn(struct rvt_qpn_table *qpt, u32 qpn) in free_qpn() argument
387 map = qpt->map + qpn / RVT_BITS_PER_PAGE; in free_qpn()
389 clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page); in free_qpn()
1282 static void rvt_free_qpn(struct rvt_qpn_table *qpt, u32 qpn) in rvt_free_qpn() argument
1286 map = qpt->map + qpn / RVT_BITS_PER_PAGE; in rvt_free_qpn()
1288 clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page); in rvt_free_qpn()