Home
last modified time | relevance | path

Searched refs:rnd (Results 1 – 25 of 56) sorted by relevance

123

/openbmc/linux/drivers/gpu/drm/i915/selftests/
H A Dscatterlist.c39 struct rnd_state *rnd);
43 struct rnd_state *rnd, in expect_pfn_sg() argument
144 struct rnd_state *rnd, in expect_pfn_sgtable() argument
167 struct rnd_state *rnd) in one() argument
174 struct rnd_state *rnd) in grow() argument
181 struct rnd_state *rnd) in shrink() argument
188 struct rnd_state *rnd) in random() argument
190 return 1 + (prandom_u32_state(rnd) % 1024); in random()
195 struct rnd_state *rnd) in random_page_size_pages() argument
204 return page_count[(prandom_u32_state(rnd) % 3)]; in random_page_size_pages()
[all …]
H A Di915_random.c34 u64 i915_prandom_u64_state(struct rnd_state *rnd) in i915_prandom_u64_state() argument
38 x = prandom_u32_state(rnd); in i915_prandom_u64_state()
40 x |= prandom_u32_state(rnd); in i915_prandom_u64_state()
H A Di915_random.h45 u64 i915_prandom_u64_state(struct rnd_state *rnd);
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dmap_lock.c24 int vars[17], i, j, rnd, key = 0; in parallel_map_access() local
36 rnd = vars[1]; in parallel_map_access()
38 if (vars[j] == rnd) in parallel_map_access()
41 i, rnd, j, vars[j]); in parallel_map_access()
42 CHECK_FAIL(vars[j] != rnd); in parallel_map_access()
/openbmc/qemu/util/
H A Did.c58 uint32_t rnd; in id_generate() local
63 rnd = g_random_int_range(0, 100); in id_generate()
68 rnd); in id_generate()
/openbmc/linux/lib/
H A Dinterval_tree_test.c27 static struct rnd_state rnd; variable
46 u32 b = (prandom_u32_state(&rnd) >> 4) % max_endpoint; in init()
47 u32 a = (prandom_u32_state(&rnd) >> 4) % b; in init()
59 queries[i] = (prandom_u32_state(&rnd) >> 4) % max_endpoint; in init()
81 prandom_seed_state(&rnd, 3141592653589793238ULL); in interval_tree_test_init()
H A Dtest_vmalloc.c82 unsigned int rnd; in random_size_align_alloc_test() local
87 rnd = get_random_u8(); in random_size_align_alloc_test()
92 align = 1 << (rnd % 23); in random_size_align_alloc_test()
97 size = ((rnd % 10) + 1) * PAGE_SIZE; in random_size_align_alloc_test()
H A Dtest_parman.c83 struct rnd_state rnd; member
134 prandom_seed_state(&test_parman->rnd, 3141592653589793238ULL); in test_parman_rnd_init()
139 return prandom_u32_state(&test_parman->rnd); in test_parman_rnd_get()
H A Drbtree_test.c30 static struct rnd_state rnd; variable
153 nodes[i].key = prandom_u32_state(&rnd); in init()
154 nodes[i].val = prandom_u32_state(&rnd); in init()
254 prandom_seed_state(&rnd, 3141592653589793238ULL); in rbtree_test_init()
/openbmc/u-boot/tools/
H A Dsunxi-spl-image-builder.c114 FILE *src, FILE *rnd, FILE *dst, in write_page() argument
161 ret = fread(buffer + offs, 1, cnt, rnd); in write_page()
162 if (!ret && !feof(rnd)) { in write_page()
203 ret = fread(buffer + cnt, 1, pad, rnd); in write_page()
204 if (!ret && !feof(rnd)) { in write_page()
242 FILE *src, *dst, *rnd; in create_image() local
272 rnd = fopen("/dev/urandom", "r"); in create_image()
273 if (!rnd) { in create_image()
281 ret = write_page(info, buffer, src, rnd, dst, bch, page++); in create_image()
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_map_lock.c37 int rnd = bpf_get_prandom_u32(); in bpf_map_lock_test() local
47 val->var[i] = rnd; in bpf_map_lock_test()
56 q->var[i] = rnd; in bpf_map_lock_test()
/openbmc/linux/tools/testing/selftests/netfilter/
H A Dipip-conntrack-mtu.sh26 rnd=$(mktemp -u XXXXXXXX)
29 r_a="ns-ra-$rnd"
30 r_b="ns-rb-$rnd"
31 r_w="ns-rw-$rnd"
32 c_a="ns-ca-$rnd"
33 c_b="ns-cb-$rnd"
H A Dnft_synproxy.sh9 rnd=$(mktemp -u XXXXXXXX)
10 nsr="nsr-$rnd" # synproxy machine
11 ns1="ns1-$rnd" # iperf client
12 ns2="ns2-$rnd" # iperf server
/openbmc/linux/arch/x86/mm/
H A Dmmap.c82 static unsigned long mmap_base(unsigned long rnd, unsigned long task_size, in mmap_base() argument
105 return PAGE_ALIGN(task_size - gap - rnd); in mmap_base()
108 static unsigned long mmap_legacy_base(unsigned long rnd, in mmap_legacy_base() argument
111 return __TASK_UNMAPPED_BASE(task_size) + rnd; in mmap_legacy_base()
/openbmc/linux/arch/s390/mm/
H A Dmmap.c43 static unsigned long mmap_base_legacy(unsigned long rnd) in mmap_base_legacy() argument
45 return TASK_UNMAPPED_BASE + rnd; in mmap_base_legacy()
48 static inline unsigned long mmap_base(unsigned long rnd, in mmap_base() argument
71 return PAGE_ALIGN(STACK_TOP - gap - rnd); in mmap_base()
/openbmc/linux/drivers/gpio/
H A Dgpio-menz127.c43 unsigned int rnd; in men_z127_debounce() local
53 rnd = fls(debounce) - 1; in men_z127_debounce()
55 if (rnd && (debounce & BIT(rnd - 1))) in men_z127_debounce()
/openbmc/linux/kernel/
H A Dacct.c336 int exp, rnd; in encode_comp_t() local
338 exp = rnd = 0; in encode_comp_t()
340 rnd = value & (1 << (EXPSIZE - 1)); /* Round up? */ in encode_comp_t()
348 if (rnd && (++value > MAXFRACT)) { in encode_comp_t()
380 int exp, rnd; in encode_comp2_t() local
383 rnd = 0; in encode_comp2_t()
385 rnd = value & 1; in encode_comp2_t()
393 if (rnd && (++value > MAXFRACT2)) { in encode_comp2_t()
/openbmc/linux/arch/x86/crypto/
H A Dsha512-ssse3-asm.S115 .macro SHA512_Round rnd argument
125 idx = \rnd
150 .macro SHA512_2Sched_2Round_sse rnd argument
171 idx = \rnd -2
177 idx = \rnd
179 idx = \rnd - 15
223 idx = \rnd + 1
244 idx = \rnd - 7
251 idx =\rnd-16
258 paddq K_t(\rnd), %xmm0 # Compute W[t]+K[t]
[all …]
H A Dsha512-avx-asm.S122 .macro SHA512_Round rnd argument
131 idx = \rnd
156 .macro SHA512_2Sched_2Round_avx rnd argument
172 idx = \rnd - 2
174 idx = \rnd - 15
187 idx = \rnd
227 idx = \rnd - 16
229 idx = \rnd - 7
236 idx = \rnd + 1
248 idx = \rnd
/openbmc/qemu/target/ppc/
H A Ddfp_helper.c72 enum rounding rnd; in dfp_prepare_rounding_mode() local
76 rnd = DEC_ROUND_HALF_EVEN; in dfp_prepare_rounding_mode()
79 rnd = DEC_ROUND_DOWN; in dfp_prepare_rounding_mode()
82 rnd = DEC_ROUND_CEILING; in dfp_prepare_rounding_mode()
85 rnd = DEC_ROUND_FLOOR; in dfp_prepare_rounding_mode()
88 rnd = DEC_ROUND_HALF_UP; in dfp_prepare_rounding_mode()
94 rnd = DEC_ROUND_UP; in dfp_prepare_rounding_mode()
97 rnd = DEC_ROUND_05UP; in dfp_prepare_rounding_mode()
109 enum rounding rnd; in dfp_set_round_mode_from_immediate() local
116 rnd = DEC_ROUND_DOWN; in dfp_set_round_mode_from_immediate()
[all …]
/openbmc/qemu/target/hexagon/imported/
H A Dmpy.idef42 STD_SP_MODES(mpy_rnd, "Rd32=mpy", ,RdV, ,fMPY16SS,":rnd" ,fPASS,fROUND)
43 STD_SP_MODES(mpy_sat_rnd,"Rd32=mpy", ,RdV, ,fMPY16SS,":rnd:sat",fSAT, fROUND)
47 STD_SP_MODES(mpyd_rnd, "Rdd32=mpy", ,RddV, ,fMPY16SS,":rnd" ,fPASS,fROUND)
243 Q6INSN(M2_vmpy2s_s0pack,"Rd32=vmpyh(Rs32,Rt32):rnd:sat",ATTRIBS(A_ARCHV2),"Vector Multiply",vmac_se…
244 Q6INSN(M2_vmpy2s_s1pack,"Rd32=vmpyh(Rs32,Rt32):<<1:rnd:sat",ATTRIBS(A_ARCHV2),"Vector Multiply",vma…
498 Q6INSN(M2_cmpyrs_s0,"Rd32=cmpy(Rs32,Rt32):rnd:sat",ATTRIBS(), "Complex Multiply",cmpy_sema(0,+,-…
499 Q6INSN(M2_cmpyrs_s1,"Rd32=cmpy(Rs32,Rt32):<<1:rnd:sat",ATTRIBS(),"Complex Multiply",cmpy_sema(1,+,-…
877 Q6INSN(M4_cmpyi_wh,"Rd32=cmpyiwh(Rss32,Rt32):<<1:rnd:sat",ATTRIBS(),"Mixed Precision Complex Multip…
885 Q6INSN(M4_cmpyr_wh,"Rd32=cmpyrwh(Rss32,Rt32):<<1:rnd:sat",ATTRIBS(),"Mixed Precision Complex Multip…
892 Q6INSN(M4_cmpyi_whc,"Rd32=cmpyiwh(Rss32,Rt32*):<<1:rnd:sat",ATTRIBS(),"Mixed Precision Complex Mult…
[all …]
/openbmc/linux/net/sched/
H A Dsch_netem.c210 u32 rnd = prandom_u32_state(&q->prng.prng_state); in loss_4state() local
224 if (rnd < clg->a4) { in loss_4state()
227 } else if (clg->a4 < rnd && rnd < clg->a1 + clg->a4) { in loss_4state()
230 } else if (clg->a1 + clg->a4 < rnd) { in loss_4state()
236 if (rnd < clg->a5) { in loss_4state()
245 if (rnd < clg->a3) in loss_4state()
247 else if (clg->a3 < rnd && rnd < clg->a2 + clg->a3) { in loss_4state()
249 } else if (clg->a2 + clg->a3 < rnd) { in loss_4state()
333 u32 rnd; in tabledist() local
338 rnd = get_crandom(state, prng); in tabledist()
[all …]
/openbmc/linux/mm/
H A Dutil.c382 unsigned long rnd; in arch_mmap_rnd() local
386 rnd = get_random_long() & ((1UL << mmap_rnd_compat_bits) - 1); in arch_mmap_rnd()
389 rnd = get_random_long() & ((1UL << mmap_rnd_bits) - 1); in arch_mmap_rnd()
391 return rnd << PAGE_SHIFT; in arch_mmap_rnd()
415 static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack) in mmap_base() argument
424 return PAGE_ALIGN_DOWN(mmap_upper_limit(rlim_stack) - rnd); in mmap_base()
442 return PAGE_ALIGN(STACK_TOP - gap - rnd); in mmap_base()
/openbmc/linux/arch/m68k/math-emu/
H A Dfp_arith.c83 if (FPDATA->rnd == FPCR_ROUND_RM) in fp_fadd()
636 fp_roundint(dest, FPDATA->rnd); in fp_fint()
681 oldround = FPDATA->rnd; in fp_fscale()
682 FPDATA->rnd = FPCR_ROUND_RZ; in fp_fscale()
684 FPDATA->rnd = oldround; in fp_fscale()
/openbmc/linux/kernel/time/
H A Dclockevents.c36 u64 rnd; in cev_delta2ns() local
40 rnd = (u64) evt->mult - 1; in cev_delta2ns()
68 if ((~0ULL - clc > rnd) && in cev_delta2ns()
70 clc += rnd; in cev_delta2ns()

123