/tools/testing/selftests/net/ |
D | ip_defrag.c | 135 int offset, bool ipv6) in send_fragment() argument 139 int payload_offset = offset > 0 ? offset - UDP_HLEN : 0; in send_fragment() 143 if (offset == 0) { in send_fragment() 159 if (payload_len - payload_offset <= max_frag_len && offset > 0) { in send_fragment() 162 fraghdr->ip6f_offlg = htons(offset); in send_fragment() 165 fraghdr->ip6f_offlg = htons(offset | IP6_MF); in send_fragment() 168 if (offset == 0) in send_fragment() 177 if (payload_len - payload_offset <= max_frag_len && offset > 0) { in send_fragment() 180 iphdr->ip_off = htons(offset / 8); in send_fragment() 183 iphdr->ip_off = htons(offset / 8 | IP4_MF); in send_fragment() [all …]
|
/tools/power/acpi/os_specific/service_layers/ |
D | osunixmap.c | 66 acpi_physical_address offset; in acpi_os_map_memory() local 79 offset = where % page_size; in acpi_os_map_memory() 83 mapped_memory = mmap(NULL, (length + offset), PROT_READ, MMAP_FLAGS, in acpi_os_map_memory() 84 fd, (where - offset)); in acpi_os_map_memory() 92 return (ACPI_CAST8(mapped_memory + offset)); in acpi_os_map_memory() 111 acpi_physical_address offset; in acpi_os_unmap_memory() local 115 offset = ACPI_TO_INTEGER(where) % page_size; in acpi_os_unmap_memory() 116 munmap((u8 *)where - offset, (length + offset)); in acpi_os_unmap_memory()
|
/tools/testing/selftests/powerpc/stringloops/ |
D | memcmp.c | 35 unsigned long offset, size; in test_one() local 37 for (offset = 0; offset < max_offset; offset++) { in test_one() 38 for (size = size_start; size < (max_size - offset); size++) { in test_one() 42 y = memcmp(s1+offset, s2+offset, size); in test_one() 43 x = test_memcmp(s1+offset, s2+offset, size); in test_one() 47 … printf("memcmp returned %d, should have returned %d (offset %ld size %ld)\n", x, y, offset, size); in test_one() 49 for (i = offset; i < offset+size; i++) in test_one() 53 for (i = offset; i < offset+size; i++) in test_one() 61 offset, size, s1, s2, vmx_count); in test_one()
|
D | strlen.c | 17 unsigned long offset; in test_one() local 19 for (offset = 0; offset < SIZE; offset++) { in test_one() 23 y = strlen(s + offset); in test_one() 24 x = test_strlen(s + offset); in test_one() 27 printf("strlen() returned %d, should have returned %d (%p offset %ld)\n", x, y, s, offset); in test_one() 29 for (i = offset; i < SIZE; i++) in test_one()
|
/tools/objtool/ |
D | check.c | 33 struct section *sec, unsigned long offset) in find_insn() argument 37 hash_for_each_possible(file->insn_hash, insn, hash, offset) in find_insn() 38 if (insn->sec == sec && insn->offset == offset) in find_insn() 72 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func() 76 for (insn = find_insn(file, func->sec, func->offset); \ 81 for (insn = find_insn(file, func->sec, func->offset); \ 84 insn->offset < func->offset + func->len; \ 90 insn->sec == func->sec && insn->offset >= func->offset; \ 165 insn = find_insn(file, func->sec, func->offset); in __dead_end_function() 236 unsigned long offset; in decode_instructions() local [all …]
|
D | warn.h | 18 static inline char *offstr(struct section *sec, unsigned long offset) in offstr() argument 24 func = find_containing_func(sec, offset); in offstr() 27 name_off = offset - func->offset; in offstr() 30 name_off = offset; in offstr() 48 #define WARN_FUNC(format, sec, offset, ...) \ argument 50 char *_str = offstr(sec, offset); \ 58 char *_str = offstr(_insn->sec, _insn->offset); \
|
D | special.c | 76 unsigned long offset; in get_alt_entry() local 78 offset = idx * entry->size; in get_alt_entry() 84 alt->orig_len = *(unsigned char *)(sec->data->d_buf + offset + in get_alt_entry() 86 alt->new_len = *(unsigned char *)(sec->data->d_buf + offset + in get_alt_entry() 93 feature = *(unsigned short *)(sec->data->d_buf + offset + in get_alt_entry() 121 orig_rela = find_rela_by_dest(sec, offset + entry->orig); in get_alt_entry() 123 WARN_FUNC("can't find orig rela", sec, offset + entry->orig); in get_alt_entry() 128 sec, offset + entry->orig, orig_rela->sym->name); in get_alt_entry() 136 new_rela = find_rela_by_dest(sec, offset + entry->new); in get_alt_entry() 139 sec, offset + entry->new); in get_alt_entry()
|
D | elf.h | 50 unsigned long offset; member 63 unsigned long offset; member 80 struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset); 82 struct symbol *find_symbol_containing(struct section *sec, unsigned long offset); 83 struct rela *find_rela_by_dest(struct section *sec, unsigned long offset); 84 struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset, 86 struct symbol *find_containing_func(struct section *sec, unsigned long offset);
|
D | elf.c | 60 struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset) in find_symbol_by_offset() argument 66 sym->offset == offset) in find_symbol_by_offset() 85 struct symbol *find_symbol_containing(struct section *sec, unsigned long offset) in find_symbol_containing() argument 91 offset >= sym->offset && offset < sym->offset + sym->len) in find_symbol_containing() 97 struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset, in find_rela_by_dest_range() argument 106 for (o = offset; o < offset + len; o++) in find_rela_by_dest_range() 108 if (rela->offset == o) in find_rela_by_dest_range() 114 struct rela *find_rela_by_dest(struct section *sec, unsigned long offset) in find_rela_by_dest() argument 116 return find_rela_by_dest_range(sec, offset, 1); in find_rela_by_dest() 119 struct symbol *find_containing_func(struct section *sec, unsigned long offset) in find_containing_func() argument [all …]
|
/tools/perf/ui/browsers/ |
D | header.c | 19 unsigned long offset = (unsigned long)browser->priv; in ui_browser__argv_write() local 21 if (offset >= strlen(str)) in ui_browser__argv_write() 24 str = str + offset; in ui_browser__argv_write() 35 unsigned long offset; in list_menu__run() local 51 offset = (unsigned long)menu->priv; in list_menu__run() 52 offset += 10; in list_menu__run() 53 menu->priv = (void *)offset; in list_menu__run() 56 offset = (unsigned long)menu->priv; in list_menu__run() 57 if (offset >= 10) in list_menu__run() 58 offset -= 10; in list_menu__run() [all …]
|
/tools/testing/nvdimm/ |
D | pmem-dax.c | 13 resource_size_t offset = PFN_PHYS(pgoff) + pmem->data_offset; in __pmem_direct_access() local 23 if (get_nfit_res(pmem->phys_addr + offset)) { in __pmem_direct_access() 27 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access() 28 page = vmalloc_to_page(pmem->virt_addr + offset); in __pmem_direct_access() 38 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access() 40 *pfn = phys_to_pfn_t(pmem->phys_addr + offset, pmem->pfn_flags); in __pmem_direct_access() 48 return PHYS_PFN(pmem->size - pmem->pfn_pad - offset); in __pmem_direct_access()
|
/tools/testing/selftests/sparc64/drivers/ |
D | adi-test.c | 209 int buf_sz, unsigned long offset) in pread_adi() argument 215 cur_offset = offset; in pread_adi() 233 bytes_read, offset); in pread_adi() 235 DEBUG_PRINT_L4("\t\t0x%lx\t%d\n", offset + i, buf[i]); in pread_adi() 264 int buf_sz, unsigned long offset) in pwrite_adi() argument 270 cur_offset = offset; in pwrite_adi() 292 bytes_written, buf_sz, offset); in pwrite_adi() 297 static off_t seek_adi(int fd, off_t offset, int whence) in seek_adi() argument 303 ret = lseek(fd, offset, whence); in seek_adi() 323 loff_t offset; in test0_prpw_aligned_1byte() local [all …]
|
/tools/perf/util/ |
D | s390-sample-raw.c | 48 size_t len = sample->raw_size, offset = 0; in s390_cpumcfdg_testctr() local 55 while (offset < len) { in s390_cpumcfdg_testctr() 56 cep = (struct cf_ctrset_entry *)(buf + offset); in s390_cpumcfdg_testctr() 62 if (!ctrset_valid(&ce) || offset + ctrset_size(&ce) > len) { in s390_cpumcfdg_testctr() 72 if (len - offset - sizeof(*te) == 4) in s390_cpumcfdg_testctr() 74 pr_err("Invalid counter set entry at %zd\n", offset); in s390_cpumcfdg_testctr() 77 offset += ctrset_size(&ce); in s390_cpumcfdg_testctr() 83 static void s390_cpumcfdg_dumptrail(const char *color, size_t offset, in s390_cpumcfdg_dumptrail() argument 103 offset, te.clock_base ? 'T' : ' ', in s390_cpumcfdg_dumptrail() 158 size_t i, len = sample->raw_size, offset = 0; in s390_cpumcfdg_dump() local [all …]
|
D | trace-event-parse.c | 16 int *offset, int *size, const char *type) in get_common_field() argument 31 *offset = field->offset; in get_common_field() 35 return tep_read_number(pevent, context->event_data + *offset, *size); in get_common_field() 40 static int offset; in common_lock_depth() local 44 ret = get_common_field(context, &size, &offset, in common_lock_depth() 54 static int offset; in common_flags() local 58 ret = get_common_field(context, &size, &offset, in common_flags() 68 static int offset; in common_pc() local 72 ret = get_common_field(context, &size, &offset, in common_pc()
|
/tools/testing/selftests/bpf/progs/ |
D | test_adjust_tail.c | 19 int offset = 0; in _xdp_adjust_tail() local 22 offset = 256; in _xdp_adjust_tail() 24 offset = 20; in _xdp_adjust_tail() 25 if (bpf_xdp_adjust_tail(xdp, 0 - offset)) in _xdp_adjust_tail()
|
D | test_xdp_vlan.c | 60 __u8 offset; in parse_eth_frame() local 62 offset = sizeof(*eth); in parse_eth_frame() 64 if ((void *)eth + offset + (2*sizeof(struct _vlan_hdr)) > data_end) in parse_eth_frame() 74 vlan_hdr = (void *)eth + offset; in parse_eth_frame() 75 pkt->vlan_outer_offset = offset; in parse_eth_frame() 79 offset += sizeof(*vlan_hdr); in parse_eth_frame() 87 vlan_hdr = (void *)eth + offset; in parse_eth_frame() 88 pkt->vlan_inner_offset = offset; in parse_eth_frame() 92 offset += sizeof(*vlan_hdr); in parse_eth_frame() 96 pkt->l3_offset = offset; in parse_eth_frame()
|
/tools/perf/arch/x86/util/ |
D | dwarf-regs.c | 39 int offset; member 42 #define REG_OFFSET_END {.name = NULL, .offset = 0} 45 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} 46 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1} 48 # define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1} 49 # define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} 113 return roff->offset; in regs_query_register_offset()
|
/tools/io_uring/ |
D | io_uring-cp.c | 29 off_t first_offset, offset; member 77 io_uring_prep_readv(sqe, infd, &data->iov, 1, data->offset); in queue_prepped() 79 io_uring_prep_writev(sqe, outfd, &data->iov, 1, data->offset); in queue_prepped() 84 static int queue_read(struct io_uring *ring, off_t size, off_t offset) in queue_read() argument 100 data->offset = data->first_offset = offset; in queue_read() 106 io_uring_prep_readv(sqe, infd, &data->iov, 1, offset); in queue_read() 114 data->offset = data->first_offset; in queue_write() 127 off_t write_left, offset; in copy_file() local 131 writes = reads = offset = 0; in copy_file() 151 if (queue_read(ring, this_size, offset)) in copy_file() [all …]
|
D | liburing.h | 109 off_t offset) in io_uring_prep_rw() argument 114 sqe->off = offset; in io_uring_prep_rw() 121 unsigned nr_vecs, off_t offset) in io_uring_prep_readv() argument 123 io_uring_prep_rw(IORING_OP_READV, sqe, fd, iovecs, nr_vecs, offset); in io_uring_prep_readv() 128 off_t offset) in io_uring_prep_read_fixed() argument 130 io_uring_prep_rw(IORING_OP_READ_FIXED, sqe, fd, buf, nbytes, offset); in io_uring_prep_read_fixed() 135 unsigned nr_vecs, off_t offset) in io_uring_prep_writev() argument 137 io_uring_prep_rw(IORING_OP_WRITEV, sqe, fd, iovecs, nr_vecs, offset); in io_uring_prep_writev() 142 off_t offset) in io_uring_prep_write_fixed() argument 144 io_uring_prep_rw(IORING_OP_WRITE_FIXED, sqe, fd, buf, nbytes, offset); in io_uring_prep_write_fixed()
|
/tools/testing/selftests/rseq/ |
D | param_test.c | 299 intptr_t offset; member 316 intptr_t offset; member 550 long offset; in this_cpu_list_pop() local 556 offset = offsetof(struct percpu_list_node, next); in this_cpu_list_pop() 559 offset, load, cpu); in this_cpu_list_pop() 694 intptr_t offset; in this_cpu_buffer_push() local 698 offset = RSEQ_READ_ONCE(buffer->c[cpu].offset); in this_cpu_buffer_push() 699 if (offset == buffer->c[cpu].buflen) in this_cpu_buffer_push() 702 targetptr_spec = (intptr_t *)&buffer->c[cpu].array[offset]; in this_cpu_buffer_push() 703 newval_final = offset + 1; in this_cpu_buffer_push() [all …]
|
/tools/testing/selftests/memfd/ |
D | fuse_mnt.c | 48 off_t offset, in memfd_readdir() argument 78 off_t offset, in memfd_read() argument 89 if (offset < len) { in memfd_read() 90 if (offset + size > len) in memfd_read() 91 size = len - offset; in memfd_read() 93 memcpy(buf, memfd_content + offset, size); in memfd_read()
|
/tools/testing/nvdimm/test/ |
D | iomap.c | 65 void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size, in __nfit_test_ioremap() argument 68 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __nfit_test_ioremap() 71 return (void __iomem *) nfit_res->buf + offset in __nfit_test_ioremap() 73 return fallback_fn(offset, size); in __nfit_test_ioremap() 77 resource_size_t offset, unsigned long size) in __wrap_devm_ioremap_nocache() argument 79 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __wrap_devm_ioremap_nocache() 82 return (void __iomem *) nfit_res->buf + offset in __wrap_devm_ioremap_nocache() 84 return devm_ioremap_nocache(dev, offset, size); in __wrap_devm_ioremap_nocache() 88 void *__wrap_devm_memremap(struct device *dev, resource_size_t offset, in __wrap_devm_memremap() argument 91 struct nfit_test_resource *nfit_res = get_nfit_res(offset); in __wrap_devm_memremap() [all …]
|
/tools/perf/ui/ |
D | browser.c | 103 void ui_browser__list_head_seek(struct ui_browser *browser, off_t offset, int whence) in ui_browser__list_head_seek() argument 127 if (offset > 0) { in ui_browser__list_head_seek() 128 while (offset-- != 0) in ui_browser__list_head_seek() 131 while (offset++ != 0) in ui_browser__list_head_seek() 138 void ui_browser__rb_tree_seek(struct ui_browser *browser, off_t offset, int whence) in ui_browser__rb_tree_seek() argument 157 if (offset > 0) { in ui_browser__rb_tree_seek() 158 while (offset-- != 0) in ui_browser__rb_tree_seek() 161 while (offset++ != 0) in ui_browser__rb_tree_seek() 370 off_t offset = nr_entries - browser->nr_entries; in ui_browser__update_nr_entries() local 374 if (offset < 0) { in ui_browser__update_nr_entries() [all …]
|
/tools/testing/selftests/ia64/ |
D | aliasing-test.c | 24 static int map_mem(char *path, off_t offset, size_t length, int touch) in map_mem() argument 42 addr = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, offset); in map_mem() 62 static int scan_tree(char *path, char *file, off_t offset, size_t length, int touch) in scan_tree() argument 89 rc = map_mem(path2, offset, length, touch); in scan_tree() 91 …fprintf(stderr, "PASS: %s 0x%lx-0x%lx is %s\n", path2, offset, offset + length, touch ? "readable"… in scan_tree() 93 fprintf(stderr, "PASS: %s 0x%lx-0x%lx not mappable\n", path2, offset, offset + length); in scan_tree() 95 fprintf(stderr, "FAIL: %s 0x%lx-0x%lx not accessible\n", path2, offset, offset + length); in scan_tree() 101 rc = scan_tree(path2, file, offset, length, touch); in scan_tree()
|
/tools/lib/ |
D | find_bit.c | 69 unsigned long offset) in find_next_bit() argument 71 return _find_next_bit(addr, NULL, size, offset, 0UL); in find_next_bit() 111 unsigned long offset) in find_next_zero_bit() argument 113 return _find_next_bit(addr, NULL, size, offset, ~0UL); in find_next_zero_bit() 120 unsigned long offset) in find_next_and_bit() argument 122 return _find_next_bit(addr1, addr2, size, offset, 0UL); in find_next_and_bit()
|