Lines Matching refs:layers
49 static int idr_max(int layers) in idr_max() argument
51 int bits = min_t(int, layers * IDR_BITS, MAX_IDR_SHIFT); in idr_max()
230 l = idp->layers; in sub_alloc()
245 if (id > idr_max(idp->layers)) { in sub_alloc()
294 int layers, v, id; in idr_get_empty_slot() local
300 layers = idp->layers; in idr_get_empty_slot()
305 layers = 1; in idr_get_empty_slot()
311 while (id > idr_max(layers)) { in idr_get_empty_slot()
312 layers++; in idr_get_empty_slot()
340 new->layer = layers-1; in idr_get_empty_slot()
347 idp->layers = layers; in idr_get_empty_slot()
538 idp->layers = 0; in sub_remove()
558 if (id > idr_max(idp->layers)) { in idr_remove()
563 sub_remove(idp, (idp->layers - 1) * IDR_BITS, id); in idr_remove()
564 if (idp->top && idp->top->count == 1 && (idp->layers > 1) && in idr_remove()
575 --idp->layers; in idr_remove()
591 n = idp->layers * IDR_BITS; in __idr_remove_all()
594 max = idr_max(idp->layers); in __idr_remove_all()
615 idp->layers = 0; in __idr_remove_all()
694 n = idp->layers * IDR_BITS; in idr_for_each()
696 max = idr_max(idp->layers); in idr_for_each()
1013 int shift = (ida->idr.layers - 1) * IDR_BITS; in ida_remove()
1019 if (idr_id > idr_max(ida->idr.layers)) in ida_remove()