Home
last modified time | relevance | path

Searched refs:shift (Results 1 – 25 of 31) sorted by relevance

12

/tools/testing/selftests/vm/
Dmap_hugetlb.c75 int shift = 0; in main() local
80 shift = atoi(argv[2]); in main()
81 if (shift) in main()
82 flags |= (shift & MAP_HUGE_MASK) << MAP_HUGE_SHIFT; in main()
85 if (shift) in main()
86 printf("%u kB hugepages\n", 1 << (shift - 10)); in main()
Dpkey-helpers.h102 u32 shift = pkey_bit_position(pkey); in set_pkey_bits() local
104 reg &= ~((u64)PKEY_MASK << shift); in set_pkey_bits()
106 reg |= (flags & PKEY_MASK) << shift; in set_pkey_bits()
112 u32 shift = pkey_bit_position(pkey); in get_pkey_bits() local
117 return ((reg >> shift) & PKEY_MASK); in get_pkey_bits()
/tools/include/linux/
Dmath64.h22 static inline u64 mul_u64_u32_shr(u64 a, u32 b, unsigned int shift) in mul_u64_u32_shr() argument
24 return (u64)(((unsigned __int128)a * b) >> shift); in mul_u64_u32_shr()
46 static inline u64 mul_u64_u32_shr(u64 a, u32 b, unsigned int shift) in mul_u64_u32_shr() argument
54 ret = mul_u32_u32(al, b) >> shift; in mul_u64_u32_shr()
56 ret += mul_u32_u32(ah, b) << (32 - shift); in mul_u64_u32_shr()
Dbitops.h69 static inline __u32 rol32(__u32 word, unsigned int shift) in rol32() argument
71 return (word << shift) | (word >> ((-shift) & 31)); in rol32()
/tools/testing/selftests/kvm/lib/
Dtest_util.c27 int shift = 0; in parse_size() local
37 shift = 40; in parse_size()
40 shift = 30; in parse_size()
43 shift = 20; in parse_size()
46 shift = 10; in parse_size()
50 shift = 0; in parse_size()
56 TEST_ASSERT((base << shift) >> shift == base, "Overflow scaling size!"); in parse_size()
58 return base << shift; in parse_size()
/tools/testing/selftests/powerpc/include/
Dpkeys.h54 unsigned long amr, shift; in pkey_set_rights() local
56 shift = (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; in pkey_set_rights()
58 amr &= ~(PKEY_BITS_MASK << shift); in pkey_set_rights()
59 amr |= (rights & PKEY_BITS_MASK) << shift; in pkey_set_rights()
/tools/testing/selftests/powerpc/nx-gzip/
Dgzfht_test.c201 int shift = (tebc & 0x7); in append_sync_flush() local
209 flush = ((0x1ULL & final) << shift) | *buf; in append_sync_flush()
210 shift = shift + 3; /* BFINAL and BTYPE written */ in append_sync_flush()
211 shift = (shift <= 8) ? 8 : 16; in append_sync_flush()
212 flush |= (0xFFFF0000ULL) << shift; /* Zero length block */ in append_sync_flush()
213 shift = shift + 32; in append_sync_flush()
214 while (shift > 0) { in append_sync_flush()
217 shift = shift - 8; in append_sync_flush()
/tools/testing/radix-tree/
Dtest.c217 tag, slot->shift, tagged, anyset); in verify_node()
229 if (slot->shift > 0) { in verify_node()
272 unsigned shift; in tree_verify_min_height() local
282 shift = node->shift; in tree_verify_min_height()
283 if (shift > 0) in tree_verify_min_height()
284 assert(maxindex > shift_maxindex(shift - RADIX_TREE_MAP_SHIFT)); in tree_verify_min_height()
D.gitignore2 generated/map-shift.h
Dmultiorder.c59 int shift = height * XA_CHUNK_SHIFT; in multiorder_iteration() local
63 assert(xas.xa_node->shift == shift); in multiorder_iteration()
Dtest.h57 unsigned long shift_maxindex(unsigned int shift);
/tools/testing/selftests/bpf/progs/
Dtest_jhash.h7 static __always_inline u32 rol32(u32 word, unsigned int shift) in rol32() argument
9 return (word << shift) | (word >> ((-shift) & 31)); in rol32()
Dbpf_cubic.c241 __u32 x, b, shift; in cubic_root() local
250 shift = (a >> (b * 3)); in cubic_root()
253 if (shift >= 64) in cubic_root()
256 x = ((__u32)(((__u32)v[shift] + 10) << b)) >> 6; in cubic_root()
Dtest_l4lb.c26 static inline __u32 rol32(__u32 word, unsigned int shift) in rol32() argument
28 return (word << shift) | (word >> ((-shift) & 31)); in rol32()
Dtest_l4lb_noinline.c20 static __always_inline __u32 rol32(__u32 word, unsigned int shift) in rol32() argument
22 return (word << shift) | (word >> ((-shift) & 31)); in rol32()
Dtest_xdp_noinline.c19 static __always_inline __u32 rol32(__u32 word, unsigned int shift) in rol32() argument
21 return (word << shift) | (word >> ((-shift) & 31)); in rol32()
/tools/testing/selftests/bpf/
Dbpf_rand.h16 static inline uint64_t bpf_rand_u##x(int shift) \
18 return bpf_rand_mask((m)) << shift; \
/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c26 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index() local
27 uint64_t mask = (1UL << (vm->va_bits - shift)) - 1; in pgd_index()
29 return (gva >> shift) & mask; in pgd_index()
34 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index() local
40 return (gva >> shift) & mask; in pud_index()
45 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index() local
51 return (gva >> shift) & mask; in pmd_index()
68 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in ptrs_per_pgd() local
69 return 1 << (vm->va_bits - shift); in ptrs_per_pgd()
/tools/iio/
Diio_utils.h46 unsigned shift; member
Diio_generic_buffer.c90 input >>= info->shift; in print1byte()
113 input >>= info->shift; in print2byte()
136 input >>= info->shift; in print4byte()
159 input >>= info->shift; in print8byte()
Diio_utils.c87 unsigned int *bits_used, unsigned int *shift, in iioutils_get_type() argument
145 &padint, shift); in iioutils_get_type()
493 &current->shift, in build_channel_array()
/tools/perf/util/intel-pt-decoder/
Dintel-pt-pkt-decoder.c434 unsigned int offs = 1, shift; in intel_pt_get_cyc() local
439 for (shift = 5; byte & 1; shift += 7) { in intel_pt_get_cyc()
445 payload |= ((uint64_t)byte >> 1) << shift; in intel_pt_get_cyc()
/tools/firewire/
Dnosy-dump.c647 uint32_t index, shift, mask; in get_bits() local
650 shift = 32 - (offset & 31) - width; in get_bits()
653 return (data[index] >> shift) & mask; in get_bits()
/tools/perf/arch/x86/util/
Dintel-pt.c492 unsigned int shift; in intel_pt_val_config_term() local
510 for (shift = 0; bits && !(bits & 1); shift++) in intel_pt_val_config_term()
513 config >>= shift; in intel_pt_val_config_term()
/tools/memory-model/Documentation/
Daccess-marking.txt531 int xor_shift_foo(int shift, int mask)
538 new = (old << shift) ^ mask;
562 int xor_shift_foo(int shift, int mask)
569 new = (old << shift) ^ mask;

12