Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 684) sorted by relevance

12345678910>>...28

/tools/perf/util/
A Dexpr.y137 RESULT.val = LHS.val OP RHS.val; \
164 $$.val = $5.val;
174 $$.val = $1.val;
178 } else if ($1.val == $5.val) {
183 $$.val = $1.val;
304 $$.val = $1.val / $3.val;
319 $$.val = (long)$1.val % (long)$3.val;
340 $$.val = $3.val / $5.val;
349 $$.val = -$2.val;
359 $$.val = $3.val < $5.val ? $3.val : $5.val;
[all …]
/tools/testing/selftests/kvm/x86/
A Dtsc_msrs_test.c21 u64 val = 0; in guest_code() local
27 val = 1ull * GUEST_STEP; in guest_code()
28 wrmsr(MSR_IA32_TSC, val); in guest_code()
34 val = 2ull * GUEST_STEP; in guest_code()
49 val = 3ull * GUEST_STEP; in guest_code()
59 val = 4ull * GUEST_STEP; in guest_code()
60 wrmsr(MSR_IA32_TSC, val); in guest_code()
98 uint64_t val; in main() local
105 val = 0; in main()
111 val = 1ull * GUEST_STEP; in main()
[all …]
/tools/include/linux/
A Dunaligned.h15 #define put_unaligned(val, ptr) __put_unaligned_t(typeof(*(ptr)), (val), (ptr)) argument
99 *p++ = (val >> 16) & 0xff; in __put_unaligned_be24()
100 *p++ = (val >> 8) & 0xff; in __put_unaligned_be24()
101 *p++ = val & 0xff; in __put_unaligned_be24()
111 *p++ = val & 0xff; in __put_unaligned_le24()
112 *p++ = (val >> 8) & 0xff; in __put_unaligned_le24()
113 *p++ = (val >> 16) & 0xff; in __put_unaligned_le24()
123 *p++ = (val >> 40) & 0xff; in __put_unaligned_be48()
124 *p++ = (val >> 32) & 0xff; in __put_unaligned_be48()
127 *p++ = (val >> 8) & 0xff; in __put_unaligned_be48()
[all …]
A Dhash.h16 #define hash_long(val, bits) hash_32(val, bits) argument
18 #define hash_long(val, bits) hash_64(val, bits) argument
60 static inline u32 __hash_32_generic(u32 val) in __hash_32_generic() argument
62 return val * GOLDEN_RATIO_32; in __hash_32_generic()
65 static inline u32 hash_32(u32 val, unsigned int bits) in hash_32() argument
68 return __hash_32(val) >> (32 - bits); in hash_32()
78 return val * GOLDEN_RATIO_64 >> (64 - bits); in hash_64_generic()
81 return hash_32((u32)val ^ __hash_32(val >> 32), bits); in hash_64_generic()
93 unsigned long val = (unsigned long)ptr; in hash32_ptr() local
96 val ^= (val >> 32); in hash32_ptr()
[all …]
A Dfind.h37 unsigned long val; in find_next_bit() local
42 val = *addr & GENMASK(size - 1, offset); in find_next_bit()
43 return val ? __ffs(val) : size; in find_next_bit()
67 unsigned long val; in find_next_and_bit() local
73 return val ? __ffs(val) : size; in find_next_and_bit()
95 unsigned long val; in find_next_zero_bit() local
100 val = *addr | ~GENMASK(size - 1, offset); in find_next_zero_bit()
101 return val == ~0UL ? size : ffz(val); in find_next_zero_bit()
123 return val ? __ffs(val) : size; in find_first_bit()
148 return val ? __ffs(val) : size; in find_first_and_bit()
[all …]
A Drefcount.h86 new = val + 1; in refcount_inc_not_zero()
88 if (!val) in refcount_inc_not_zero()
94 old = atomic_cmpxchg_relaxed(&r->refs, val, new); in refcount_inc_not_zero()
95 if (old == val) in refcount_inc_not_zero()
98 val = old; in refcount_inc_not_zero()
131 if (unlikely(val == UINT_MAX)) in refcount_sub_and_test()
134 new = val - i; in refcount_sub_and_test()
135 if (new > val) { in refcount_sub_and_test()
140 old = atomic_cmpxchg_release(&r->refs, val, new); in refcount_sub_and_test()
141 if (old == val) in refcount_sub_and_test()
[all …]
/tools/testing/selftests/rcutorture/bin/
A Dsrcu_lockdep.sh52 val=$((d*1000+t*10+c))
55 mv "$T/kvm.sh.out" "$RCUTORTURE/res/$ds/$val"
65 echo -n Unexpected success for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err"
75 cat "$RCUTORTURE/res/$ds/$val/kvm.sh.err"
83 for val in 0x1 0xf
88 mv "$T/kvm.sh.out" "$RCUTORTURE/res/$ds/$val"
95 if test "$val" -eq 0xf && test "$ret" -eq 0
98 echo -n Unexpected success for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err"
100 if test "$val" -eq 0x1 && test "$ret" -ne 0
103 echo -n Unexpected failure for > "$RCUTORTURE/res/$ds/$val/kvm.sh.err"
[all …]
/tools/include/tools/
A Dbe_byteshift.h25 *p++ = val >> 8; in __put_unaligned_be16()
26 *p++ = val; in __put_unaligned_be16()
31 __put_unaligned_be16(val >> 16, p); in __put_unaligned_be32()
32 __put_unaligned_be16(val, p + 2); in __put_unaligned_be32()
37 __put_unaligned_be32(val >> 32, p); in __put_unaligned_be64()
38 __put_unaligned_be32(val, p + 4); in __put_unaligned_be64()
56 static inline void put_unaligned_be16(uint16_t val, void *p) in put_unaligned_be16() argument
58 __put_unaligned_be16(val, p); in put_unaligned_be16()
61 static inline void put_unaligned_be32(uint32_t val, void *p) in put_unaligned_be32() argument
63 __put_unaligned_be32(val, p); in put_unaligned_be32()
[all …]
A Dle_byteshift.h25 *p++ = val; in __put_unaligned_le16()
26 *p++ = val >> 8; in __put_unaligned_le16()
31 __put_unaligned_le16(val >> 16, p + 2); in __put_unaligned_le32()
32 __put_unaligned_le16(val, p); in __put_unaligned_le32()
37 __put_unaligned_le32(val >> 32, p + 4); in __put_unaligned_le64()
38 __put_unaligned_le32(val, p); in __put_unaligned_le64()
56 static inline void put_unaligned_le16(uint16_t val, void *p) in put_unaligned_le16() argument
58 __put_unaligned_le16(val, p); in put_unaligned_le16()
61 static inline void put_unaligned_le32(uint32_t val, void *p) in put_unaligned_le32() argument
63 __put_unaligned_le32(val, p); in put_unaligned_le32()
[all …]
/tools/testing/ktest/examples/bootconfigs/
A Dverify-functiongraph.sh7 val="$2"
9 if [ "$content" != "$val" ]; then
17 val="$2"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
28 val="$2"
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
39 val="$2"
41 content=`cat $file | sed -ne "/^[0 ]*$val/p"`
[all …]
A Dverify-tracing.sh7 val="$2"
9 if [ "$content" != "$val" ]; then
17 val="$2"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
28 val="$2"
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
39 val="$2"
41 content=`cat $file | sed -ne "/^[0 ]*$val/p"`
[all …]
A Dverify-boottrace.sh7 val="$2"
9 if [ "$content" != "$val" ]; then
17 val="$2"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
28 val="$2"
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
39 val="$2"
41 content=`cat $file | sed -ne "/^[0 ]*$val/p"`
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dbtf_map_in_map.c28 int err, key = 0, val, i; in test_lookup_update() local
53 bpf_map_lookup_elem(map1_fd, &key, &val); in test_lookup_update()
54 CHECK(val != 1, "inner1", "got %d != exp %d\n", val, 1); in test_lookup_update()
56 CHECK(val != 2, "inner2", "got %d != exp %d\n", val, 2); in test_lookup_update()
58 CHECK(val != 3, "inner3", "got %d != exp %d\n", val, 3); in test_lookup_update()
67 CHECK(val != 4, "inner1", "got %d != exp %d\n", val, 4); in test_lookup_update()
69 CHECK(val != 3, "inner2", "got %d != exp %d\n", val, 3); in test_lookup_update()
71 CHECK(val != 5, "inner4", "got %d != exp %d\n", val, 5); in test_lookup_update()
78 CHECK(val != 7, "inner5", "got %d != exp %d\n", val, 7); in test_lookup_update()
81 val = i % 2 ? map1_fd : map2_fd; in test_lookup_update()
[all …]
/tools/perf/tests/
A Dparse-metric.c18 u64 val; member
27 return v->val; in find_value()
42 evsel->stats->aggr->counts.val = count; in load_runtime_stat()
135 { .event = "inst_retired.any", .val = 300 }, in test_ipc()
136 { .event = "cpu_clk_unhalted.thread", .val = 200 }, in test_ipc()
171 { .event = "l1d-loads-misses", .val = 300 }, in test_cache_miss_cycles()
172 { .event = "l1i-loads-misses", .val = 200 }, in test_cache_miss_cycles()
173 { .event = "inst_retired.any", .val = 400 }, in test_cache_miss_cycles()
238 { .event = "inst_retired.any", .val = 300 }, in test_recursion_fail()
255 { .event = "l1d.replacement", .val = 4000000 }, in test_memory_bandwidth()
[all …]
/tools/testing/selftests/powerpc/math/
A Dfpu.h11 long val; in randomise_darray() local
14 val = random(); in randomise_darray()
15 if (val & 1) in randomise_darray()
16 val *= -1; in randomise_darray()
18 if (val & 2) in randomise_darray()
19 darray[i] = 1.0 / val; in randomise_darray()
21 darray[i] = val * val; in randomise_darray()
/tools/objtool/include/objtool/
A Dendianness.h21 #define bswap_if_needed(elf, val) \ argument
23 __typeof__(val) __ret; \
25 switch (sizeof(val)) { \
27 __ret = __need_bswap ? bswap_64(val) : (val); break; \
29 __ret = __need_bswap ? bswap_32(val) : (val); break; \
31 __ret = __need_bswap ? bswap_16(val) : (val); break; \
/tools/power/cpupower/utils/helpers/
A Dmsr.c26 int read_msr(int cpu, unsigned int idx, unsigned long long *val) in read_msr() argument
37 if (read(fd, val, sizeof *val) != sizeof *val) in read_msr()
55 int write_msr(int cpu, unsigned int idx, unsigned long long val) in write_msr() argument
66 if (write(fd, &val, sizeof val) != sizeof val) in write_msr()
77 unsigned long long val; in msr_intel_get_turbo_ratio() local
83 ret = read_msr(cpu, MSR_NEHALEM_TURBO_RATIO_LIMIT, &val); in msr_intel_get_turbo_ratio()
86 return val; in msr_intel_get_turbo_ratio()
/tools/perf/trace/beauty/
A Dfcntl.c14 return val ? scnprintf(bf, size, "%s", "0") : in fcntl__scnprintf_getfd()
38 if (arg->val == F_GETFL) { in syscall_arg__scnprintf_fcntl_cmd()
42 if (arg->val == F_GETFD) { in syscall_arg__scnprintf_fcntl_cmd()
46 if (arg->val == F_DUPFD_CLOEXEC || arg->val == F_DUPFD) { in syscall_arg__scnprintf_fcntl_cmd()
50 if (arg->val == F_GETOWN) { in syscall_arg__scnprintf_fcntl_cmd()
54 if (arg->val == F_GETLEASE) { in syscall_arg__scnprintf_fcntl_cmd()
61 if (arg->val == F_GET_SEALS || in syscall_arg__scnprintf_fcntl_cmd()
62 arg->val == F_GETSIG) { in syscall_arg__scnprintf_fcntl_cmd()
79 return fcntl__scnprintf_getfd(arg->val, bf, size, show_prefix); in syscall_arg__scnprintf_fcntl_arg()
82 return open__scnprintf_flags(arg->val, bf, size, show_prefix); in syscall_arg__scnprintf_fcntl_arg()
[all …]
/tools/testing/selftests/bpf/progs/
A Dtimer.c174 if (val->counter > 0 && --val->counter) { in timer_cb2()
230 struct hmap_elem *val; in bpf_timer_test() local
234 if (val) { in bpf_timer_test()
241 if (val) { in bpf_timer_test()
253 struct hmap_elem init = {}, *val; in BPF_PROG2() local
259 if (val) in BPF_PROG2()
266 if (val) in BPF_PROG2()
277 if (val) in BPF_PROG2()
282 if (val) in BPF_PROG2()
289 if (val) in BPF_PROG2()
[all …]
A Dtest_xdp_update_frags.c18 __u8 val[16] = {}; in xdp_adjust_frags() local
26 err = bpf_xdp_load_bytes(xdp, offset, val, sizeof(val)); in xdp_adjust_frags()
30 if (val[0] != 0xaa || val[15] != 0xaa) /* marker */ in xdp_adjust_frags()
33 val[0] = 0xbb; /* update the marker */ in xdp_adjust_frags()
34 val[15] = 0xbb; in xdp_adjust_frags()
35 err = bpf_xdp_store_bytes(xdp, offset, val, sizeof(val)); in xdp_adjust_frags()
A Dtimer_mim.c41 static int timer_cb2(void *map, int *key, struct hmap_elem *val) in timer_cb2() argument
44 bpf_timer_set_callback(&val->timer, timer_cb1); in timer_cb2()
45 if (bpf_timer_start(&val->timer, 1000, 0)) in timer_cb2()
55 bpf_timer_set_callback(&val->timer, timer_cb2); in timer_cb1()
56 if (bpf_timer_start(&val->timer, 1000, 0)) in timer_cb1()
69 struct hmap_elem *val; in BPF_PROG() local
78 val = bpf_map_lookup_elem(inner_map, &hash_key); in BPF_PROG()
79 if (!val) in BPF_PROG()
82 bpf_timer_init(&val->timer, inner_map, CLOCK_MONOTONIC); in BPF_PROG()
83 if (bpf_timer_set_callback(&val->timer, timer_cb1)) in BPF_PROG()
[all …]
A Dbpf_arena_spin_lock.h34 atomic_t val; member
235 int val = atomic_read(&lock->val); in arena_spin_trylock() local
237 if (unlikely(val)) in arena_spin_trylock()
240 return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)); in arena_spin_trylock()
259 val = atomic_cond_read_relaxed_label(&lock->val, in arena_spin_lock_slowpath()
429 if (atomic_try_cmpxchg_relaxed(&lock->val, &val, _Q_LOCKED_VAL)) in arena_spin_lock_slowpath()
495 int val = 0; in arena_spin_lock() local
501 if (likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL))) in arena_spin_lock()
504 val = arena_spin_lock_slowpath(lock, val); in arena_spin_lock()
506 if (val) in arena_spin_lock()
[all …]
A Dverifier_array_access.c550 struct test_val *val; in an_array_with_a_constant_no_nullness() local
555 return val->index; in an_array_with_a_constant_no_nullness()
593 return val->index; in an_array_with_a_32bit_constant_0_no_nullness()
608 return val->index; in a_pcpu_array_with_a_constant_no_nullness()
623 return val->index; in an_array_with_a_constant_no_nullness_out_of_bounds()
646 return val->index; in an_array_with_a_constant_too_small()
664 return val->index; in an_array_with_a_constant_too_big()
680 return val->index; in mixed_const_and_non_const_key_lookup()
713 return val->index; in non_stack_key_lookup()
725 if (val) in doesnt_reject_irrelevant_maps()
[all …]
/tools/virtio/linux/
A Dvirtio_config.h71 static inline u16 virtio16_to_cpu(struct virtio_device *vdev, __virtio16 val) in virtio16_to_cpu() argument
73 return __virtio16_to_cpu(virtio_is_little_endian(vdev), val); in virtio16_to_cpu()
76 static inline __virtio16 cpu_to_virtio16(struct virtio_device *vdev, u16 val) in cpu_to_virtio16() argument
78 return __cpu_to_virtio16(virtio_is_little_endian(vdev), val); in cpu_to_virtio16()
81 static inline u32 virtio32_to_cpu(struct virtio_device *vdev, __virtio32 val) in virtio32_to_cpu() argument
83 return __virtio32_to_cpu(virtio_is_little_endian(vdev), val); in virtio32_to_cpu()
86 static inline __virtio32 cpu_to_virtio32(struct virtio_device *vdev, u32 val) in cpu_to_virtio32() argument
88 return __cpu_to_virtio32(virtio_is_little_endian(vdev), val); in cpu_to_virtio32()
91 static inline u64 virtio64_to_cpu(struct virtio_device *vdev, __virtio64 val) in virtio64_to_cpu() argument
93 return __virtio64_to_cpu(virtio_is_little_endian(vdev), val); in virtio64_to_cpu()
[all …]
/tools/testing/selftests/powerpc/dscr/
A Ddscr.h48 inline void set_dscr(unsigned long val) in set_dscr() argument
50 mtspr(SPRN_DSCR_PRIV, val); in set_dscr()
59 inline void set_dscr_usr(unsigned long val) in set_dscr_usr() argument
61 mtspr(SPRN_DSCR, val); in set_dscr_usr()
68 unsigned long val; in get_default_dscr() local
70 err = read_ulong(DSCR_DEFAULT, &val, 16); in get_default_dscr()
75 return val; in get_default_dscr()
78 void set_default_dscr(unsigned long val) in set_default_dscr() argument
82 err = write_ulong(DSCR_DEFAULT, val, 16); in set_default_dscr()

Completed in 43 milliseconds

12345678910>>...28