/tools/power/cpupower/debug/i386/ |
D | intel_gsic.c | 17 struct LRMI_regs r; in main() local 23 memset(&r, 0, sizeof(r)); in main() 25 r.eax = 0x0000E980; in main() 26 r.edx = 0x47534943; in main() 28 retval = LRMI_int(0x15, &r); in main() 34 if (r.eax == 0x47534943) { in main() 37 (r.eax >> 24) & 0xff, in main() 38 (r.eax >> 16) & 0xff, in main() 39 (r.eax >> 8) & 0xff, in main() 40 (r.eax) & 0xff); in main() [all …]
|
/tools/testing/selftests/powerpc/include/ |
D | instructions.h | 80 #define __PPC_PREFIX_R(r) (((r) & 0x1) << 20) argument 98 #define PREFIX_MLS(instr, t, a, r, d) stringify_in_c(.balign 64, , 4;) \ argument 100 __PPC_PREFIX_R(r) | \ 107 #define PREFIX_8LS(instr, t, a, r, d) stringify_in_c(.balign 64, , 4;) \ argument 109 __PPC_PREFIX_R(r) | \ 117 #define PLBZ(t, a, r, d) PREFIX_MLS(PPC_INST_LBZ, t, a, r, d) argument 118 #define PLHZ(t, a, r, d) PREFIX_MLS(PPC_INST_LHZ, t, a, r, d) argument 119 #define PLHA(t, a, r, d) PREFIX_MLS(PPC_INST_LHA, t, a, r, d) argument 120 #define PLWZ(t, a, r, d) PREFIX_MLS(PPC_INST_LWZ, t, a, r, d) argument 121 #define PLWA(t, a, r, d) PREFIX_8LS(0xa4000000, t, a, r, d) argument [all …]
|
/tools/perf/util/ |
D | parse-regs-options.c | 16 const struct sample_reg *r = NULL; in __parse_regs() local 50 for (r = sample_reg_masks; r->name; r++) { in __parse_regs() 51 if (r->mask & mask) in __parse_regs() 52 fprintf(stderr, "%s ", r->name); in __parse_regs() 60 for (r = sample_reg_masks; r->name; r++) { in __parse_regs() 61 if ((r->mask & mask) && !strcasecmp(s, r->name)) in __parse_regs() 65 if (!r || !r->name) { in __parse_regs() 71 *mode |= r->mask; in __parse_regs()
|
D | color.c | 16 int r = 0; in __color_vsnprintf() local 29 r += scnprintf(bf, size, "%s", color); in __color_vsnprintf() 30 r += vscnprintf(bf + r, size - r, fmt, args); in __color_vsnprintf() 32 r += scnprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); in __color_vsnprintf() 34 r += scnprintf(bf + r, size - r, "%s", trail); in __color_vsnprintf() 35 return r; in __color_vsnprintf() 42 int r = 0; in __color_vfprintf() local 56 r += vfprintf(fp, fmt, args); in __color_vfprintf() 59 return r; in __color_vfprintf() 77 int r; in color_snprintf() local [all …]
|
D | strfilter.c | 25 strfilter_node__delete(node->r); in strfilter_node__delete() 68 struct strfilter_node *r) in strfilter_node__alloc() argument 75 node->r = r; in strfilter_node__alloc() 97 if (!cur->r || !last_op->r) in strfilter_node__new() 99 cur = strfilter_node__alloc(OP_and, last_op->r, NULL); in strfilter_node__new() 102 last_op->r = cur; in strfilter_node__new() 106 if (!cur->r || !root.r) in strfilter_node__new() 108 cur = strfilter_node__alloc(OP_or, root.r, NULL); in strfilter_node__new() 111 root.r = cur; in strfilter_node__new() 115 if (cur->r) in strfilter_node__new() [all …]
|
D | trace-event-read.c | 54 int r; in do_read() local 56 r = __do_read(input_fd, data, size); in do_read() 57 if (r <= 0) { in do_read() 59 size, r); in do_read() 63 trace_data_size += r; in do_read() 65 return r; in do_read() 72 int r; in skip() local 75 r = size > BUFSIZ ? BUFSIZ : size; in skip() 76 do_read(buf, r); in skip() 77 size -= r; in skip() [all …]
|
/tools/include/linux/ |
D | refcount.h | 58 static inline void refcount_set(refcount_t *r, unsigned int n) in refcount_set() argument 60 atomic_set(&r->refs, n); in refcount_set() 63 static inline unsigned int refcount_read(const refcount_t *r) in refcount_read() argument 65 return atomic_read(&r->refs); in refcount_read() 76 bool refcount_inc_not_zero(refcount_t *r) in refcount_inc_not_zero() argument 78 unsigned int old, new, val = atomic_read(&r->refs); in refcount_inc_not_zero() 89 old = atomic_cmpxchg_relaxed(&r->refs, val, new); in refcount_inc_not_zero() 107 static inline void refcount_inc(refcount_t *r) in refcount_inc() argument 109 REFCOUNT_WARN(!refcount_inc_not_zero(r), "refcount_t: increment on 0; use-after-free.\n"); in refcount_inc() 121 bool refcount_sub_and_test(unsigned int i, refcount_t *r) in refcount_sub_and_test() argument [all …]
|
/tools/testing/selftests/memfd/ |
D | fuse_test.c | 46 int r, fd; in mfd_assert_new() local 55 r = ftruncate(fd, sz); in mfd_assert_new() 56 if (r < 0) { in mfd_assert_new() 66 long r; in mfd_assert_get_seals() local 68 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals() 69 if (r < 0) { in mfd_assert_get_seals() 74 return r; in mfd_assert_get_seals() 91 long r; in mfd_assert_add_seals() local 95 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals() 96 if (r < 0) { in mfd_assert_add_seals() [all …]
|
D | memfd_test.c | 39 int r, fd; in mfd_assert_new() local 48 r = ftruncate(fd, sz); in mfd_assert_new() 49 if (r < 0) { in mfd_assert_new() 59 int r, fd; in mfd_assert_reopen_fd() local 75 int r; in mfd_fail_new() local 77 r = sys_memfd_create(name, flags); in mfd_fail_new() 78 if (r >= 0) { in mfd_fail_new() 81 close(r); in mfd_fail_new() 88 int r; in mfd_assert_get_seals() local 90 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals() [all …]
|
/tools/lib/lockdep/ |
D | preload.c | 223 int r; in pthread_mutex_init() local 237 r = ll_pthread_mutex_init(mutex, attr); in pthread_mutex_init() 238 if (r == 0) in pthread_mutex_init() 246 return r; in pthread_mutex_init() 251 int r; in pthread_mutex_lock() local 271 r = ll_pthread_mutex_lock(mutex); in pthread_mutex_lock() 272 if (r) in pthread_mutex_lock() 275 return r; in pthread_mutex_lock() 280 int r; in pthread_mutex_trylock() local 285 r = ll_pthread_mutex_trylock(mutex); in pthread_mutex_trylock() [all …]
|
/tools/bpf/ |
D | bpf_dbg.c | 438 static void bpf_dump_curr(struct bpf_regs *r, struct sock_filter *f) in bpf_dump_curr() argument 442 rl_printf("pc: [%u]\n", r->Pc); in bpf_dump_curr() 446 bpf_disasm(*f, r->Pc); in bpf_dump_curr() 450 bpf_disasm(*(f + f->jt + 1), r->Pc + f->jt + 1); in bpf_dump_curr() 452 bpf_disasm(*(f + f->jf + 1), r->Pc + f->jf + 1); in bpf_dump_curr() 455 rl_printf("A: [%#08x][%u]\n", r->A, r->A); in bpf_dump_curr() 456 rl_printf("X: [%#08x][%u]\n", r->X, r->X); in bpf_dump_curr() 457 if (r->Rs) in bpf_dump_curr() 458 rl_printf("ret: [%#08x][%u]!\n", r->R, r->R); in bpf_dump_curr() 461 if (r->M[i]) { in bpf_dump_curr() [all …]
|
/tools/virtio/ |
D | virtio_test.c | 57 int r; in vq_notify() local 58 r = write(info->kick, &v, sizeof v); in vq_notify() 59 assert(r == sizeof v); in vq_notify() 79 int r; in vhost_vq_setup() local 80 r = ioctl(dev->control, VHOST_SET_FEATURES, &features); in vhost_vq_setup() 81 assert(r >= 0); in vhost_vq_setup() 83 r = ioctl(dev->control, VHOST_SET_VRING_NUM, &state); in vhost_vq_setup() 84 assert(r >= 0); in vhost_vq_setup() 86 r = ioctl(dev->control, VHOST_SET_VRING_BASE, &state); in vhost_vq_setup() 87 assert(r >= 0); in vhost_vq_setup() [all …]
|
/tools/include/asm-generic/bitops/ |
D | fls.h | 15 int r = 32; in fls() local 21 r -= 16; in fls() 25 r -= 8; in fls() 29 r -= 4; in fls() 33 r -= 2; in fls() 37 r -= 1; in fls() 39 return r; in fls()
|
/tools/lib/bpf/ |
D | ringbuf.c | 42 static void ringbuf_unmap_ring(struct ring_buffer *rb, struct ring *r) in ringbuf_unmap_ring() argument 44 if (r->consumer_pos) { in ringbuf_unmap_ring() 45 munmap(r->consumer_pos, rb->page_size); in ringbuf_unmap_ring() 46 r->consumer_pos = NULL; in ringbuf_unmap_ring() 48 if (r->producer_pos) { in ringbuf_unmap_ring() 49 munmap(r->producer_pos, rb->page_size + 2 * (r->mask + 1)); in ringbuf_unmap_ring() 50 r->producer_pos = NULL; in ringbuf_unmap_ring() 61 struct ring *r; in ring_buffer__add() local 92 r = &rb->rings[rb->ring_cnt]; in ring_buffer__add() 93 memset(r, 0, sizeof(*r)); in ring_buffer__add() [all …]
|
D | xsk.h | 80 static inline int xsk_ring_prod__needs_wakeup(const struct xsk_ring_prod *r) in xsk_ring_prod__needs_wakeup() argument 82 return *r->flags & XDP_RING_NEED_WAKEUP; in xsk_ring_prod__needs_wakeup() 85 static inline __u32 xsk_prod_nb_free(struct xsk_ring_prod *r, __u32 nb) in xsk_prod_nb_free() argument 87 __u32 free_entries = r->cached_cons - r->cached_prod; in xsk_prod_nb_free() 99 r->cached_cons = *r->consumer + r->size; in xsk_prod_nb_free() 101 return r->cached_cons - r->cached_prod; in xsk_prod_nb_free() 104 static inline __u32 xsk_cons_nb_avail(struct xsk_ring_cons *r, __u32 nb) in xsk_cons_nb_avail() argument 106 __u32 entries = r->cached_prod - r->cached_cons; in xsk_cons_nb_avail() 109 r->cached_prod = *r->producer; in xsk_cons_nb_avail() 110 entries = r->cached_prod - r->cached_cons; in xsk_cons_nb_avail()
|
/tools/testing/selftests/pidfd/ |
D | pidfd_fdinfo_test.c | 28 int r; in error_set() local 35 r = vsnprintf(err->msg, sizeof(err->msg), fmt, args); in error_set() 36 assert((size_t)r < sizeof(err->msg)); in error_set() 132 int r; in child_join() local 134 r = wait_for_pid(child->pid); in child_join() 135 if (r < 0) in child_join() 137 r, errno); in child_join() 138 else if (r > 0) in child_join() 139 error_set(err, r, "child %d reported: %d", child->pid, r); in child_join() 143 r = -1; in child_join() [all …]
|
/tools/perf/ui/browsers/ |
D | res_sample.c | 41 struct res_sample *r; in res_sample_browse() local 66 r = &res_samples[choice]; in res_sample_browse() 68 n = timestamp__scnprintf_nsec(r->time - context_len, trange, sizeof trange); in res_sample_browse() 70 timestamp__scnprintf_nsec(r->time + context_len, trange + n, sizeof trange - n); in res_sample_browse() 72 timestamp__scnprintf_nsec(r->time, tsample, sizeof tsample); in res_sample_browse() 81 r->cpu >= 0 ? "--cpu " : "", in res_sample_browse() 82 r->cpu >= 0 ? (sprintf(cpubuf, "%d", r->cpu), cpubuf) : "", in res_sample_browse() 83 r->tid ? "--tid " : "", in res_sample_browse() 84 r->tid ? (sprintf(tidbuf, "%d", r->tid), tidbuf) : "", in res_sample_browse() 90 r->tid ? "--show-switch-events --show-task-events " : "", in res_sample_browse()
|
/tools/testing/selftests/powerpc/mm/ |
D | pkey_siginfo.c | 246 struct region r; in test() local 255 r.size = getpagesize(); in test() 256 r.base = mmap(NULL, r.size, PROT_RWX, in test() 258 FAIL_IF(r.base == MAP_FAILED); in test() 264 numinsns = r.size / sizeof(r.base[0]); in test() 266 r.base[i] = PPC_INST_NOP; in test() 267 r.base[i] = PPC_INST_BLR; in test() 300 r.rights = PKEY_DISABLE_ACCESS; in test() 301 FAIL_IF(pthread_create(&prot_thread, &attr, &protect, &r) != 0); in test() 302 FAIL_IF(pthread_create(&pacc_thread, &attr, &protect_access, &r) != 0); in test() [all …]
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | processor.c | 785 int r; in vcpu_get_msr() local 790 r = ioctl(vcpu->fd, KVM_GET_MSRS, &buffer.header); in vcpu_get_msr() 791 TEST_ASSERT(r == 1, "KVM_GET_MSRS IOCTL failed,\n" in vcpu_get_msr() 792 " rc: %i errno: %i", r, errno); in vcpu_get_msr() 820 int r; in _vcpu_set_msr() local 827 r = ioctl(vcpu->fd, KVM_SET_MSRS, &buffer.header); in _vcpu_set_msr() 828 return r; in _vcpu_set_msr() 849 int r; in vcpu_set_msr() local 851 r = _vcpu_set_msr(vm, vcpuid, msr_index, msr_value); in vcpu_set_msr() 852 TEST_ASSERT(r == 1, "KVM_SET_MSRS IOCTL failed,\n" in vcpu_set_msr() [all …]
|
/tools/perf/arch/arm64/tests/ |
D | regs_load.S | 6 #define STR_REG(r) str x##r, [x0, 8 * r] argument 7 #define LDR_REG(r) ldr x##r, [x0, 8 * r] argument
|
/tools/testing/selftests/kvm/ |
D | demand_paging_test.c | 81 int r; in handle_uffd_page_request() local 92 r = ioctl(uffd, UFFDIO_COPY, ©); in handle_uffd_page_request() 93 if (r == -1) { in handle_uffd_page_request() 96 return r; in handle_uffd_page_request() 132 int r; in uffd_handler_thread_fn() local 140 r = poll(pollfd, 2, -1); in uffd_handler_thread_fn() 141 switch (r) { in uffd_handler_thread_fn() 150 pr_info("Polling uffd returned %d", r); in uffd_handler_thread_fn() 160 r = read(pollfd[1].fd, &tmp_chr, 1); in uffd_handler_thread_fn() 161 TEST_ASSERT(r == 1, in uffd_handler_thread_fn() [all …]
|
/tools/testing/selftests/kvm/x86_64/ |
D | kvm_pv_test.c | 50 bool r, w; in guest_gp_handler() local 52 r = rip == &rdmsr_start; in guest_gp_handler() 54 GUEST_ASSERT(r || w); in guest_gp_handler() 58 if (r) in guest_gp_handler() 123 uint64_t r; in test_hcall() local 126 r = kvm_hypercall(hc->nr, 0, 0, 0, 0); in test_hcall() 127 GUEST_ASSERT(r == -KVM_ENOSYS); in test_hcall() 180 int r; in enter_guest() local 185 r = _vcpu_run(vm, VCPU_ID); in enter_guest() 186 TEST_ASSERT(!r, "vcpu_run failed: %d\n", r); in enter_guest()
|
/tools/testing/selftests/bpf/ |
D | test_bpftool.py | 165 r"/\*\*\* System call availability \*\*\*/", 166 r"#define HAVE_BPF_SYSCALL", 167 r"/\*\*\* eBPF program types \*\*\*/", 168 r"#define HAVE.*PROG_TYPE", 169 r"/\*\*\* eBPF map types \*\*\*/", 170 r"#define HAVE.*MAP_TYPE", 171 r"/\*\*\* eBPF helper functions \*\*\*/", 172 r"#define HAVE.*HELPER", 173 r"/\*\*\* eBPF misc features \*\*\*/",
|
/tools/perf/arch/x86/util/ |
D | dwarf-regs.c | 45 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} argument 46 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1} argument 48 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1} argument 49 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} argument
|
/tools/virtio/ringtest/ |
D | main.c | 37 int r; in notify() local 40 r = write(fd, &v, sizeof v); in notify() 41 assert(r == sizeof v); in notify() 48 int r; in wait_for_notify() local 51 r = read(fd, &v, sizeof v); in wait_for_notify() 52 assert(r == sizeof v); in wait_for_notify() 113 int r; in run_guest() local 125 r = add_inbuf(0, "Buffer\n", "Hello, world!"); in run_guest() 126 if (__builtin_expect(r == 0, true)) { in run_guest() 136 r = -1; in run_guest() [all …]
|