| /tools/include/linux/ |
| A D | unaligned.h | 79 return p[0] << 16 | p[1] << 8 | p[2]; in __get_unaligned_be24() 89 return p[0] | p[1] << 8 | p[2] << 16; in __get_unaligned_le24() 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() 127 *p++ = (val >> 8) & 0xff; in __put_unaligned_be48() 128 *p++ = val & 0xff; in __put_unaligned_be48() 138 return (u64)p[0] << 40 | (u64)p[1] << 32 | (u64)p[2] << 24 | in __get_unaligned_be48() [all …]
|
| /tools/include/tools/ |
| A D | be_byteshift.h | 9 return p[0] << 8 | p[1]; in __get_unaligned_be16() 14 return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; in __get_unaligned_be32() 20 __get_unaligned_be32(p + 4); in __get_unaligned_be64() 25 *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() 38 __put_unaligned_be32(val, p + 4); in __put_unaligned_be64() 58 __put_unaligned_be16(val, p); in put_unaligned_be16() 63 __put_unaligned_be32(val, p); in put_unaligned_be32() [all …]
|
| A D | le_byteshift.h | 9 return p[0] | p[1] << 8; in __get_unaligned_le16() 14 return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; in __get_unaligned_le32() 20 __get_unaligned_le32(p); in __get_unaligned_le64() 25 *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() 38 __put_unaligned_le32(val, p); in __put_unaligned_le64() 58 __put_unaligned_le16(val, p); in put_unaligned_le16() 63 __put_unaligned_le32(val, p); in put_unaligned_le32() [all …]
|
| /tools/testing/selftests/net/ovpn/ |
| A D | test.sh | 21 setup_ns ${p} 5.5.5.$((${p} + 1))/24 ${MTU} 30 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120 46 ip -n peer${p} addr del 10.10.${p}.2/24 dev veth${p} 47 ip -n peer${p} addr add 10.10.${p}.3/24 dev veth${p} 62 ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} ${p} 83 ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 1 84 ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 2 97 ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 1 98 ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 2 104 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 0 0 [all …]
|
| A D | test-close-socket.sh | 16 for p in $(seq 0 ${NUM_PEERS}); do 17 create_ns ${p} 20 for p in $(seq 0 ${NUM_PEERS}); do 21 setup_ns ${p} 5.5.5.$((${p} + 1))/24 24 for p in $(seq 0 ${NUM_PEERS}); do 25 add_peer ${p} 28 for p in $(seq 1 ${NUM_PEERS}); do 29 ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 30 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120 35 for p in $(seq 1 ${NUM_PEERS}); do [all …]
|
| A D | common.sh | 26 ip link add veth${p} netns peer0 type veth peer name veth${p} netns peer${p} 28 ip -n peer0 addr add 10.10.${p}.1/24 dev veth${p} 29 ip -n peer0 addr add fd00:0:0:${p}::1/64 dev veth${p} 32 ip -n peer${p} addr add 10.10.${p}.2/24 dev veth${p} 33 ip -n peer${p} addr add fd00:0:0:${p}::2/64 dev veth${p} 34 ip -n peer${p} link set veth${p} up 90 for p in $(seq 1 10); do 91 ip -n peer${p} link set tun${p} down 2>/dev/null || true 92 ip netns exec peer${p} ${OVPN_CLI} del_iface tun${p} 2>/dev/null || true 94 for p in $(seq 1 10); do [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | mem_rdonly_untrusted.c | 44 char *p; in ldx_is_ok_bad_addr() local 58 int v, *p; in ldx_is_ok_good_addr() local 62 return *p; in ldx_is_ok_good_addr() 74 p++; in offset_not_tracked() 75 s += *p; in offset_not_tracked() 85 int v, *p; in stx_not_ok() local 89 *p = 1; in stx_not_ok() 124 int *p; in kfunc_param_not_ok() local 136 char *p; in helper_param_not_ok() local 160 u64 *p; in mixed_mem_type() local [all …]
|
| A D | percpu_alloc_fail.c | 13 char *p; member 51 if (!p) in BPF_PROG() 54 p = bpf_kptr_xchg(&e->pc, p); in BPF_PROG() 55 if (p) in BPF_PROG() 80 if (p) in BPF_PROG() 100 if (!p) in BPF_PROG() 119 if (!p) in BPF_PROG() 133 if (!p) in BPF_PROG() 147 if (!p) in BPF_PROG() 161 if (!p) in BPF_PROG() [all …]
|
| A D | cb_refs.c | 20 void *p = *(void **)ctx; in cb1() local 21 bpf_kfunc_call_test_release(p); in cb1() 29 struct prog_test_ref_kfunc *p; in underflow_prog() local 33 if (!p) in underflow_prog() 59 p = NULL; in leak_prog() 61 p = bpf_kptr_xchg(&v->ptr, p); in leak_prog() 62 if (p) in leak_prog() 75 void *p; in cb3() local 93 if (!p) in nested_cb() 107 if (!p) in non_cb_transfer_ref() [all …]
|
| A D | kfunc_call_fail.c | 43 int *p = NULL; in kfunc_call_test_get_mem_fail_rdonly() local 49 if (p) in kfunc_call_test_get_mem_fail_rdonly() 64 int *p = NULL; in kfunc_call_test_get_mem_fail_use_after_free() local 70 if (p) { in kfunc_call_test_get_mem_fail_use_after_free() 71 p[0] = 42; in kfunc_call_test_get_mem_fail_use_after_free() 79 if (p) in kfunc_call_test_get_mem_fail_use_after_free() 96 if (p) in kfunc_call_test_get_mem_fail_oob() 119 if (p) in kfunc_call_test_get_mem_fail_not_const() 120 ret = p[0]; in kfunc_call_test_get_mem_fail_not_const() 141 if (p) in kfunc_call_test_mem_acquire_fail() [all …]
|
| A D | percpu_alloc_array.c | 37 if (!p) in BPF_PROG() 40 p = bpf_kptr_xchg(&e->pc, p); in BPF_PROG() 41 if (p) in BPF_PROG() 60 p = e->pc; in BPF_PROG() 61 if (!p) in BPF_PROG() 92 p = e->pc; in BPF_PROG() 93 if (!p) in BPF_PROG() 122 if (p) { in BPF_PROG() 145 p = e->pc; in BPF_PROG() 146 if (!p) { in BPF_PROG() [all …]
|
| A D | jit_probe_mem.c | 14 struct prog_test_ref_kfunc *p; in test_jit_probe_mem() local 17 p = bpf_kfunc_call_test_acquire(&zero); in test_jit_probe_mem() 18 if (!p) in test_jit_probe_mem() 21 p = bpf_kptr_xchg(&v, p); in test_jit_probe_mem() 22 if (p) in test_jit_probe_mem() 26 p = v; in test_jit_probe_mem() 27 if (!p) in test_jit_probe_mem() 48 : [p] "r"(p) in test_jit_probe_mem() 55 bpf_kfunc_call_test_release(p); in test_jit_probe_mem()
|
| A D | socket_cookie_prog.c | 35 struct socket_cookie *p; in set_cookie() local 42 if (!p) in set_cookie() 45 p->cookie_value = 0xF; in set_cookie() 46 p->cookie_key = bpf_get_socket_cookie(ctx); in set_cookie() 55 struct socket_cookie *p; in update_cookie_sockops() local 67 if (!p) in update_cookie_sockops() 70 if (p->cookie_key != bpf_get_socket_cookie(ctx)) in update_cookie_sockops() 73 p->cookie_value |= (ctx->local_port << 8); in update_cookie_sockops() 82 struct socket_cookie *p; in BPF_PROG() local 88 if (!p) in BPF_PROG() [all …]
|
| /tools/testing/selftests/bpf/ |
| A D | bpf_atomic.h | 47 #define cmpxchg(p, old, new) __sync_val_compare_and_swap((p), old, new) argument 52 __unqual_typeof(*(p)) __r = cmpxchg(p, __o, new); \ 58 #define try_cmpxchg_relaxed(p, pold, new) try_cmpxchg(p, pold, new) argument 60 #define try_cmpxchg_acquire(p, pold, new) try_cmpxchg(p, pold, new) argument 89 __unqual_typeof(*(p)) __v = READ_ONCE(*(p)); \ 96 #define smp_store_release(p, val) \ argument 101 WRITE_ONCE(*(p), val); \ 106 typeof(p) __ptr = (p); \ 126 #define atomic_read(p) READ_ONCE((p)->counter) argument 135 try_cmpxchg_relaxed(&(p)->counter, pold, new) [all …]
|
| /tools/perf/ui/ |
| A D | progress.c | 18 u64 last = p->curr; in ui_progress__update() 20 p->curr += adv; in ui_progress__update() 22 if (p->curr >= p->next) { in ui_progress__update() 23 u64 nr = DIV_ROUND_UP(p->curr - last, p->step); in ui_progress__update() 25 p->next += nr * p->step; in ui_progress__update() 33 p->curr = 0; in __ui_progress__init() 34 p->next = p->step = total / 16 ?: 1; in __ui_progress__init() 35 p->total = total; in __ui_progress__init() 36 p->title = title; in __ui_progress__init() 37 p->size = size; in __ui_progress__init() [all …]
|
| /tools/testing/selftests/powerpc/cache_shape/ |
| A D | cache_shape.c | 54 ElfW(auxv_t) *p; in test_cache_shape() 62 if (p) { in test_cache_shape() 68 if (p) { in test_cache_shape() 70 print_geo("L1I ", (uint32_t)p->a_un.a_val); in test_cache_shape() 74 if (p) { in test_cache_shape() 80 if (p) { in test_cache_shape() 82 print_geo("L1D ", (uint32_t)p->a_un.a_val); in test_cache_shape() 86 if (p) { in test_cache_shape() 92 if (p) { in test_cache_shape() 98 if (p) { in test_cache_shape() [all …]
|
| /tools/testing/selftests/mm/ |
| A D | khugepaged.c | 260 void *p; in alloc_mapping() local 269 return p; in alloc_mapping() 277 p[i * page_size / sizeof(*p)] = i + 0xdead0000; in fill_memory() 341 i, p[i * page_size / sizeof(*p)]); in validate_memory() 370 void *p; in file_setup_area() local 399 if (p == MAP_FAILED || p != BASE_ADDR) { in file_setup_area() 440 void *p; in shmem_setup_area() local 617 char *p; in alloc_at_fault() local 623 *p = 1; in alloc_at_fault() 643 void *p; in collapse_full() local [all …]
|
| A D | map_fixed_noreplace.c | 45 char *p; in main() local 61 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main() 62 if (p == MAP_FAILED) { in main() 75 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main() 76 if (p == MAP_FAILED) { in main() 94 if (p != MAP_FAILED) { in main() 113 if (p != MAP_FAILED) { in main() 131 if (p != MAP_FAILED) { in main() 149 if (p != MAP_FAILED) { in main() 167 if (p == MAP_FAILED) { in main() [all …]
|
| /tools/testing/radix-tree/ |
| A D | regression1.c | 57 struct page *p; in page_alloc() local 59 p->count = 1; in page_alloc() 60 p->index = index; in page_alloc() 63 return p; in page_alloc() 69 assert(!p->count); in page_rcu_free() 71 free(p); in page_rcu_free() 125 struct page *p; in regression1_fn() local 140 p->count--; in regression1_fn() 143 page_free(p); in regression1_fn() 148 p->count--; in regression1_fn() [all …]
|
| /tools/arch/arm64/include/asm/ |
| A D | barrier.h | 32 switch (sizeof(*p)) { \ 35 : "=Q" (*p) \ 41 : "=Q" (*p) \ 47 : "=Q" (*p) \ 53 : "=Q" (*p) \ 64 #define smp_load_acquire(p) \ argument 69 switch (sizeof(*p)) { \ 73 : "Q" (*p) : "memory"); \ 78 : "Q" (*p) : "memory"); \ 83 : "Q" (*p) : "memory"); \ [all …]
|
| /tools/lib/api/fs/ |
| A D | cgroup.c | 24 char *p, *path; in cgroupfs_find_mountpoint() local 56 if (p == NULL) in cgroupfs_find_mountpoint() 60 path = ++p; in cgroupfs_find_mountpoint() 61 p = strchr(p, ' '); in cgroupfs_find_mountpoint() 62 if (p == NULL) in cgroupfs_find_mountpoint() 65 *p++ = '\0'; in cgroupfs_find_mountpoint() 71 if (p[6] == '2') { in cgroupfs_find_mountpoint() 78 p += 7; in cgroupfs_find_mountpoint() 80 p = strstr(p, subsys); in cgroupfs_find_mountpoint() 81 if (p == NULL) in cgroupfs_find_mountpoint() [all …]
|
| /tools/virtio/linux/ |
| A D | kernel.h | 43 #define virt_to_phys(p) ((unsigned long)p) argument 46 #define page_to_phys(p) ((dma_addr_t)(unsigned long)(p)) argument 47 #define virt_to_page(p) ((struct page *)((unsigned long)p & PAGE_MASK)) argument 49 #define offset_in_page(p) (((unsigned long)p) % PAGE_SIZE) argument 71 memset(p, 0, s); in kzalloc() 72 return p; in kzalloc() 82 if (p >= __kfree_ignore_start && p < __kfree_ignore_end) in kfree() 84 free(p); in kfree() 89 kfree(p); in free_pages_exact() 94 return realloc(p, s); in krealloc() [all …]
|
| /tools/perf/bench/ |
| A D | numa.c | 1026 for (p = 0; p < g->p.nr_proc; p++) { in count_node_processes() 1032 task_nr = p*g->p.nr_threads + t; in count_node_processes() 1049 int p; in calc_convergence_compression() local 1054 for (p = 0; p < g->p.nr_proc; p++) { in calc_convergence_compression() 1535 if (!g->p.mb_global_str && !g->p.mb_proc_str && !g->p.mb_thread_str) in init() 1539 g->p.mb_global = atof(g->p.mb_global_str); in init() 1544 g->p.mb_proc = atof(g->p.mb_proc_str); in init() 1555 g->p.mb_thread = atof(g->p.mb_thread_str); in init() 1562 g->p.nr_tasks = g->p.nr_proc*g->p.nr_threads; in init() 1774 for (p = 0; p < g->p.nr_proc; p++) { in __bench_numa() [all …]
|
| /tools/testing/selftests/proc/ |
| A D | proc-uptime.h | 40 char buf[64], *p; in proc_uptime() local 49 p = buf; in proc_uptime() 51 val1 = xstrtoull(p, &p); in proc_uptime() 52 assert(p[0] == '.'); in proc_uptime() 53 assert('0' <= p[1] && p[1] <= '9'); in proc_uptime() 54 assert('0' <= p[2] && p[2] <= '9'); in proc_uptime() 55 assert(p[3] == ' '); in proc_uptime() 57 val2 = (p[1] - '0') * 10 + p[2] - '0'; in proc_uptime()
|
| /tools/include/asm-generic/bitops/ |
| A D | non-atomic.h | 20 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in ___set_bit() local 22 *p |= mask; in ___set_bit() 29 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in ___clear_bit() local 31 *p &= ~mask; in ___clear_bit() 49 *p ^= mask; in ___change_bit() 66 unsigned long old = *p; in ___test_and_set_bit() 68 *p = old | mask; in ___test_and_set_bit() 86 unsigned long old = *p; in ___test_and_clear_bit() 88 *p = old & ~mask; in ___test_and_clear_bit() 98 unsigned long old = *p; in ___test_and_change_bit() [all …]
|