Lines Matching refs:offset
88 int offset) in tag_set() argument
90 __set_bit(offset, node->tags[tag]); in tag_set()
94 int offset) in tag_clear() argument
96 __clear_bit(offset, node->tags[tag]); in tag_clear()
100 int offset) in tag_get() argument
102 return test_bit(offset, node->tags[tag]); in tag_get()
152 unsigned long size, unsigned long offset) in radix_tree_find_next_bit() argument
155 return find_next_bit(addr, size, offset); in radix_tree_find_next_bit()
157 if (offset < size) { in radix_tree_find_next_bit()
160 addr += offset / BITS_PER_LONG; in radix_tree_find_next_bit()
161 tmp = *addr >> (offset % BITS_PER_LONG); in radix_tree_find_next_bit()
163 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
164 offset = (offset + BITS_PER_LONG) & ~(BITS_PER_LONG - 1); in radix_tree_find_next_bit()
165 while (offset < size) { in radix_tree_find_next_bit()
168 return __ffs(tmp) + offset; in radix_tree_find_next_bit()
169 offset += BITS_PER_LONG; in radix_tree_find_next_bit()
389 unsigned int height, shift, offset; in __radix_tree_create() local
404 offset = 0; /* uninitialised var warning */ in __radix_tree_create()
413 rcu_assign_pointer(node->slots[offset], slot); in __radix_tree_create()
415 slot->path |= offset << RADIX_TREE_HEIGHT_SHIFT; in __radix_tree_create()
421 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in __radix_tree_create()
423 slot = node->slots[offset]; in __radix_tree_create()
431 *slotp = node ? node->slots + offset : (void **)&root->rnode; in __radix_tree_create()
600 int offset; in radix_tree_tag_set() local
602 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in radix_tree_tag_set()
603 if (!tag_get(slot, tag, offset)) in radix_tree_tag_set()
604 tag_set(slot, tag, offset); in radix_tree_tag_set()
605 slot = slot->slots[offset]; in radix_tree_tag_set()
639 int uninitialized_var(offset); in radix_tree_tag_clear()
653 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in radix_tree_tag_clear()
655 slot = slot->slots[offset]; in radix_tree_tag_clear()
662 if (!tag_get(node, tag, offset)) in radix_tree_tag_clear()
664 tag_clear(node, tag, offset); in radix_tree_tag_clear()
669 offset = index & RADIX_TREE_MAP_MASK; in radix_tree_tag_clear()
722 int offset; in radix_tree_tag_get() local
727 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in radix_tree_tag_get()
728 if (!tag_get(node, tag, offset)) in radix_tree_tag_get()
732 node = rcu_dereference_raw(node->slots[offset]); in radix_tree_tag_get()
752 unsigned long index, offset, height; in radix_tree_next_chunk() local
785 offset = index >> shift; in radix_tree_next_chunk()
788 if (offset >= RADIX_TREE_MAP_SIZE) in radix_tree_next_chunk()
794 !test_bit(offset, node->tags[tag]) : in radix_tree_next_chunk()
795 !node->slots[offset]) { in radix_tree_next_chunk()
801 offset = radix_tree_find_next_bit( in radix_tree_next_chunk()
804 offset + 1); in radix_tree_next_chunk()
806 while (++offset < RADIX_TREE_MAP_SIZE) { in radix_tree_next_chunk()
807 if (node->slots[offset]) in radix_tree_next_chunk()
811 index += offset << shift; in radix_tree_next_chunk()
815 if (offset == RADIX_TREE_MAP_SIZE) in radix_tree_next_chunk()
823 node = rcu_dereference_raw(node->slots[offset]); in radix_tree_next_chunk()
827 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in radix_tree_next_chunk()
838 tag_long = offset / BITS_PER_LONG; in radix_tree_next_chunk()
839 tag_bit = offset % BITS_PER_LONG; in radix_tree_next_chunk()
852 return node->slots + offset; in radix_tree_next_chunk()
915 int offset; in radix_tree_range_tag_if_tagged() local
917 offset = (index >> shift) & RADIX_TREE_MAP_MASK; in radix_tree_range_tag_if_tagged()
918 if (!slot->slots[offset]) in radix_tree_range_tag_if_tagged()
920 if (!tag_get(slot, iftag, offset)) in radix_tree_range_tag_if_tagged()
926 slot = slot->slots[offset]; in radix_tree_range_tag_if_tagged()
932 tag_set(slot, settag, offset); in radix_tree_range_tag_if_tagged()
938 offset = upindex & RADIX_TREE_MAP_MASK; in radix_tree_range_tag_if_tagged()
941 if (tag_get(node, settag, offset)) in radix_tree_range_tag_if_tagged()
943 tag_set(node, settag, offset); in radix_tree_range_tag_if_tagged()
1340 unsigned int offset; in __radix_tree_delete_node() local
1342 offset = node->path >> RADIX_TREE_HEIGHT_SHIFT; in __radix_tree_delete_node()
1343 parent->slots[offset] = NULL; in __radix_tree_delete_node()
1375 unsigned int offset; in radix_tree_delete_item() local
1393 offset = index & RADIX_TREE_MAP_MASK; in radix_tree_delete_item()
1400 if (tag_get(node, tag, offset)) in radix_tree_delete_item()
1404 node->slots[offset] = NULL; in radix_tree_delete_item()