Lines Matching refs:qpn
107 u32 i, offset, max_scan, qpn; in alloc_qpn() local
132 qpn = qpt->last + 1; in alloc_qpn()
133 if (qpn >= QPN_MAX) in alloc_qpn()
134 qpn = 2; in alloc_qpn()
135 offset = qpn & BITS_PER_PAGE_MASK; in alloc_qpn()
136 map = &qpt->map[qpn / BITS_PER_PAGE]; in alloc_qpn()
148 qpt->last = qpn; in alloc_qpn()
149 ret = qpn; in alloc_qpn()
153 qpn = mk_qpn(qpt, map, offset); in alloc_qpn()
162 } while (offset < BITS_PER_PAGE && qpn < QPN_MAX); in alloc_qpn()
181 qpn = mk_qpn(qpt, map, offset); in alloc_qpn()
190 static void free_qpn(struct ipath_qp_table *qpt, u32 qpn) in free_qpn() argument
194 map = qpt->map + qpn / BITS_PER_PAGE; in free_qpn()
196 clear_bit(qpn & BITS_PER_PAGE_MASK, map->page); in free_qpn()
301 struct ipath_qp *ipath_lookup_qpn(struct ipath_qp_table *qpt, u32 qpn) in ipath_lookup_qpn() argument
308 for (qp = qpt->table[qpn % qpt->max]; qp; qp = qp->next) { in ipath_lookup_qpn()
309 if (qp->ibqp.qp_num == qpn) { in ipath_lookup_qpn()