/lib/ |
D | ts_bm.c | 67 int shift = bm->patlen - 1; in bm_find() local 74 while (shift < text_len) { in bm_find() 76 shift, text[shift]); in bm_find() 78 if ((icase ? toupper(text[shift-i]) in bm_find() 79 : text[shift-i]) in bm_find() 85 return consumed + (shift-(bm->patlen-1)); in bm_find() 87 next: bs = bm->bad_shift[text[shift-i]]; in bm_find() 90 shift = max_t(int, shift-i+bs, shift+bm->good_shift[i]); in bm_find()
|
D | xarray.c | 144 return (index >> node->shift) & XA_CHUNK_MASK; in get_offset() 155 unsigned int shift = xas->xa_node->shift; in xas_move_index() local 156 xas->xa_index &= ~XA_CHUNK_MASK << shift; in xas_move_index() 157 xas->xa_index += offset << shift; in xas_move_index() 193 if ((xas->xa_index >> xa_to_node(entry)->shift) > XA_CHUNK_MASK) in xas_start() 210 if (node->shift && xa_is_node(entry)) in xas_descend() 240 if (xas->xa_shift > node->shift) in xas_load() 243 if (node->shift == 0) in xas_load() 361 static void *xas_alloc(struct xa_state *xas, unsigned int shift) in xas_alloc() argument 390 XA_NODE_BUG_ON(node, shift > BITS_PER_LONG); in xas_alloc() [all …]
|
D | radix-tree.c | 86 unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK; in radix_tree_descend() 209 static inline unsigned long shift_maxindex(unsigned int shift) in shift_maxindex() argument 211 return (RADIX_TREE_MAP_SIZE << shift) - 1; in shift_maxindex() 216 return shift_maxindex(node->shift); in node_maxindex() 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 278 ret->shift = shift; in radix_tree_node_alloc() 396 return node->shift + RADIX_TREE_MAP_SHIFT; in radix_tree_load_root() 407 unsigned long index, unsigned int shift) in radix_tree_extend() argument 414 maxshift = shift; in radix_tree_extend() [all …]
|
D | iommu-helper.c | 11 unsigned long shift, unsigned long boundary_size, in iommu_area_alloc() argument 21 if (iommu_is_span_boundary(index, nr, shift, boundary_size)) { in iommu_area_alloc() 22 start = ALIGN(shift + index, boundary_size) - shift; in iommu_area_alloc()
|
D | sbitmap.c | 83 int sbitmap_init_node(struct sbitmap *sb, unsigned int depth, int shift, in sbitmap_init_node() argument 89 if (shift < 0) in sbitmap_init_node() 90 shift = sbitmap_calculate_shift(depth); in sbitmap_init_node() 92 bits_per_word = 1U << shift; in sbitmap_init_node() 96 sb->shift = shift; in sbitmap_init_node() 125 unsigned int bits_per_word = 1U << sb->shift; in sbitmap_resize() 208 nr += index << sb->shift; in __sbitmap_get() 255 nr += index << sb->shift; in __sbitmap_get_shallow() 264 alloc_hint = index << sb->shift; in __sbitmap_get_shallow() 336 seq_printf(m, "bits_per_word=%u\n", 1U << sb->shift); in sbitmap_show() [all …]
|
D | rhashtable.c | 77 const unsigned int shift = PAGE_SHIFT - ilog2(sizeof(void *)); in nested_table_free() local 78 const unsigned int len = 1 << shift; in nested_table_free() 86 size >>= shift; in nested_table_free() 151 const unsigned int shift = PAGE_SHIFT - ilog2(sizeof(void *)); in nested_bucket_table_alloc() local 155 if (nbuckets < (1 << (shift + 1))) in nested_bucket_table_alloc() 170 tbl->nest = (ilog2(nbuckets) - 1) % shift + 1; in nested_bucket_table_alloc() 1177 const unsigned int shift = PAGE_SHIFT - ilog2(sizeof(void *)); in __rht_bucket_nested() local 1187 while (ntbl && size > (1 << shift)) { in __rht_bucket_nested() 1188 index = subhash & ((1 << shift) - 1); in __rht_bucket_nested() 1191 size >>= shift; in __rht_bucket_nested() [all …]
|
D | idr.c | 558 extern void xa_dump_index(unsigned long index, unsigned int shift); 570 unsigned int shift = node->shift + IDA_CHUNK_SHIFT + in ida_dump_entry() local 573 xa_dump_index(index * IDA_BITMAP_BITS, shift); in ida_dump_entry() 577 index | (i << node->shift)); in ida_dump_entry()
|
D | Kconfig.ubsan | 76 bool "Perform checking for bit-shift overflows" 78 depends on $(cc-option,-fsanitize=shift) 80 This option enables -fsanitize=shift which checks for bit-shift
|
D | bitmap.c | 104 unsigned shift, unsigned nbits) in __bitmap_shift_right() argument 107 unsigned off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_right() 149 unsigned int shift, unsigned int nbits) in __bitmap_shift_left() argument 153 unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; in __bitmap_shift_left()
|
D | test_printf.c | 600 int shift; member 630 flags |= (values[i] & pft[i].mask) << pft[i].shift; in page_flags_test()
|
D | maple_tree.c | 479 unsigned long shift; in mte_set_parent() local 489 shift = MAPLE_PARENT_SLOT_SHIFT; in mte_set_parent() 495 shift = type = 0; in mte_set_parent() 500 val |= (slot << shift) | type; in mte_set_parent() 1832 unsigned char shift) in mab_shift_right() argument 1836 memmove(b_node->pivot + shift, b_node->pivot, size); in mab_shift_right() 1837 memmove(b_node->slot + shift, b_node->slot, size); in mab_shift_right() 1839 memmove(b_node->gap + shift, b_node->gap, size); in mab_shift_right() 3047 unsigned char shift, b_end = ++b_node->b_end; in mas_rebalance() local 3079 shift = mas_data_end(&l_mas) + 1; in mas_rebalance() [all …]
|
D | vsprintf.c | 499 int shift = 3; in number() local 502 shift = 4; in number() 505 num >>= shift; in number() 1993 int shift; member 2047 buf = number(buf, end, (flags >> pff[i].shift) & pff[i].mask, in format_page_flags()
|
D | test_maple_tree.c | 2698 int loop, shift; in check_empty_area_fill() local 2702 for (shift = 12; shift <= 16; shift++) { in check_empty_area_fill() 2704 size = 1 << shift; in check_empty_area_fill()
|
D | assoc_array.c | 260 int shift = shortcut->skip_to_level & ASSOC_ARRAY_KEY_CHUNK_MASK; in assoc_array_walk() local 261 dissimilarity &= ~(ULONG_MAX << shift); in assoc_array_walk()
|
/lib/math/ |
D | div64.c | 200 int shift; in mul_u64_u64_div_u64() local 223 shift = ilog2(a) + ilog2(b) - 62; in mul_u64_u64_div_u64() 224 if (shift > 0) { in mul_u64_u64_div_u64() 226 b >>= shift; in mul_u64_u64_div_u64() 227 c >>= shift; in mul_u64_u64_div_u64()
|
/lib/vdso/ |
D | gettimeofday.c | 21 static __always_inline u64 vdso_shift_ns(u64 ns, u32 shift) in vdso_shift_ns() argument 23 return ns >> shift; in vdso_shift_ns() 79 ns = vdso_shift_ns(ns, vd->shift); in do_hres_timens() 150 ns = vdso_shift_ns(ns, vd->shift); in do_hres()
|
/lib/zstd/compress/ |
D | zstd_compress_sequences.c | 140 unsigned const shift = 8 - accuracyLog; in ZSTD_crossEntropyCost() local 146 unsigned const norm256 = normAcc << shift; in ZSTD_crossEntropyCost()
|
/lib/reed_solomon/ |
D | test_rslib.c | 87 int shift; member 463 int pad = (pad_coef[i].mult * max_pad) >> pad_coef[i].shift; in run_exercise()
|