• Home
  • Raw
  • Download

Lines Matching refs:offset

86 	unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK;  in radix_tree_descend()  local
87 void __rcu **entry = rcu_dereference_raw(parent->slots[offset]); in radix_tree_descend()
90 return offset; in radix_tree_descend()
99 int offset) in tag_set() argument
101 __set_bit(offset, node->tags[tag]); in tag_set()
105 int offset) in tag_clear() argument
107 __clear_bit(offset, node->tags[tag]); in tag_clear()
111 int offset) in tag_get() argument
113 return test_bit(offset, node->tags[tag]); in tag_get()
179 unsigned long offset) in radix_tree_find_next_bit() argument
183 if (offset < RADIX_TREE_MAP_SIZE) { in radix_tree_find_next_bit()
186 addr += offset / BITS_PER_LONG; in radix_tree_find_next_bit()
187 tmp = *addr >> (offset % BITS_PER_LONG); in radix_tree_find_next_bit()
189 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
190 offset = (offset + BITS_PER_LONG) & ~(BITS_PER_LONG - 1); in radix_tree_find_next_bit()
191 while (offset < RADIX_TREE_MAP_SIZE) { in radix_tree_find_next_bit()
194 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
195 offset += BITS_PER_LONG; in radix_tree_find_next_bit()
221 unsigned long offset) in next_index() argument
223 return (index & ~node_maxindex(node)) + (offset << node->shift); in next_index()
233 unsigned int shift, unsigned int offset, in radix_tree_node_alloc() argument
279 ret->offset = offset; in radix_tree_node_alloc()
558 parent->slots[node->offset] = NULL; in delete_node()
603 unsigned int shift, offset = 0; in __radix_tree_create() local
623 offset, 0, 0); in __radix_tree_create()
634 offset = radix_tree_descend(node, &child, index); in __radix_tree_create()
635 slot = &node->slots[offset]; in __radix_tree_create()
656 unsigned offset = 0; in radix_tree_free_nodes() local
660 void *entry = rcu_dereference_raw(child->slots[offset]); in radix_tree_free_nodes()
663 offset = 0; in radix_tree_free_nodes()
666 offset++; in radix_tree_free_nodes()
667 while (offset == RADIX_TREE_MAP_SIZE) { in radix_tree_free_nodes()
669 offset = child->offset + 1; in radix_tree_free_nodes()
719 unsigned offset = get_slot_offset(node, slot); in radix_tree_insert() local
720 BUG_ON(tag_get(node, 0, offset)); in radix_tree_insert()
721 BUG_ON(tag_get(node, 1, offset)); in radix_tree_insert()
722 BUG_ON(tag_get(node, 2, offset)); in radix_tree_insert()
761 unsigned offset; in __radix_tree_lookup() local
764 offset = radix_tree_descend(parent, &node, index); in __radix_tree_lookup()
765 slot = parent->slots + offset; in __radix_tree_lookup()
834 unsigned int tag, unsigned int offset) in node_tag_get() argument
837 return tag_get(node, tag, offset); in node_tag_get()
853 unsigned offset = get_slot_offset(node, slot); in calculate_count() local
854 bool free = node_tag_get(root, node, IDR_FREE, offset); in calculate_count()
938 unsigned int tag, unsigned int offset) in node_tag_set() argument
941 if (tag_get(node, tag, offset)) in node_tag_set()
943 tag_set(node, tag, offset); in node_tag_set()
944 offset = node->offset; in node_tag_set()
975 unsigned offset; in radix_tree_tag_set() local
978 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_set()
981 if (!tag_get(parent, tag, offset)) in radix_tree_tag_set()
982 tag_set(parent, tag, offset); in radix_tree_tag_set()
995 unsigned int tag, unsigned int offset) in node_tag_clear() argument
998 if (!tag_get(node, tag, offset)) in node_tag_clear()
1000 tag_clear(node, tag, offset); in node_tag_clear()
1004 offset = node->offset; in node_tag_clear()
1032 int offset; in radix_tree_tag_clear() local
1042 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_clear()
1046 node_tag_clear(root, parent, tag, offset); in radix_tree_tag_clear()
1093 unsigned offset; in radix_tree_tag_get() local
1096 offset = radix_tree_descend(parent, &node, index); in radix_tree_tag_get()
1098 if (!tag_get(parent, tag, offset)) in radix_tree_tag_get()
1110 struct radix_tree_node *node, unsigned offset, in set_iter_tags() argument
1113 unsigned tag_long = offset / BITS_PER_LONG; in set_iter_tags()
1114 unsigned tag_bit = offset % BITS_PER_LONG; in set_iter_tags()
1157 unsigned long index, offset, maxindex; in radix_tree_next_chunk() local
1193 offset = radix_tree_descend(node, &child, index); in radix_tree_next_chunk()
1196 !tag_get(node, tag, offset) : !child) { in radix_tree_next_chunk()
1202 offset = radix_tree_find_next_bit(node, tag, in radix_tree_next_chunk()
1203 offset + 1); in radix_tree_next_chunk()
1205 while (++offset < RADIX_TREE_MAP_SIZE) { in radix_tree_next_chunk()
1207 node->slots[offset]); in radix_tree_next_chunk()
1212 index += offset << node->shift; in radix_tree_next_chunk()
1216 if (offset == RADIX_TREE_MAP_SIZE) in radix_tree_next_chunk()
1218 child = rcu_dereference_raw(node->slots[offset]); in radix_tree_next_chunk()
1228 iter->index = (index &~ node_maxindex(node)) | offset; in radix_tree_next_chunk()
1233 set_iter_tags(iter, node, offset, tag); in radix_tree_next_chunk()
1235 return node->slots + offset; in radix_tree_next_chunk()
1367 unsigned offset = get_slot_offset(node, slot); in __radix_tree_delete() local
1371 node_tag_set(root, node, IDR_FREE, offset); in __radix_tree_delete()
1374 node_tag_clear(root, node, tag, offset); in __radix_tree_delete()
1481 unsigned int shift, offset = 0; in idr_get_free() local
1505 offset, 0, 0); in idr_get_free()
1516 offset = radix_tree_descend(node, &child, start); in idr_get_free()
1517 if (!tag_get(node, IDR_FREE, offset)) { in idr_get_free()
1518 offset = radix_tree_find_next_bit(node, IDR_FREE, in idr_get_free()
1519 offset + 1); in idr_get_free()
1520 start = next_index(start, node, offset); in idr_get_free()
1523 while (offset == RADIX_TREE_MAP_SIZE) { in idr_get_free()
1524 offset = node->offset + 1; in idr_get_free()
1530 child = rcu_dereference_raw(node->slots[offset]); in idr_get_free()
1532 slot = &node->slots[offset]; in idr_get_free()
1541 set_iter_tags(iter, node, offset, IDR_FREE); in idr_get_free()