Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 135) sorted by relevance

123456

/tools/testing/radix-tree/
Dtag_check.c14 __simple_checks(struct radix_tree_root *tree, unsigned long index, int tag) in __simple_checks() argument
19 item_check_absent(tree, index); in __simple_checks()
20 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
22 item_insert(tree, index); in __simple_checks()
23 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
24 item_tag_set(tree, index, tag); in __simple_checks()
25 ret = item_tag_get(tree, index, tag); in __simple_checks()
29 ret = item_tag_get(tree, index, !tag); in __simple_checks()
31 ret = item_delete(tree, index); in __simple_checks()
33 item_insert(tree, index); in __simple_checks()
[all …]
Dtest.c12 item_tag_set(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_set() argument
14 return radix_tree_tag_set(root, index, tag); in item_tag_set()
18 item_tag_clear(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_clear() argument
20 return radix_tree_tag_clear(root, index, tag); in item_tag_clear()
23 int item_tag_get(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_get() argument
25 return radix_tree_tag_get(root, index, tag); in item_tag_get()
28 struct item *item_create(unsigned long index, unsigned int order) in item_create() argument
32 ret->index = index; in item_create()
37 int item_insert(struct radix_tree_root *root, unsigned long index) in item_insert() argument
39 struct item *item = item_create(index, 0); in item_insert()
[all …]
Dtest.h9 unsigned long index; member
13 struct item *item_create(unsigned long index, unsigned int order);
14 int item_insert(struct radix_tree_root *root, unsigned long index);
15 void item_sanity(struct item *item, unsigned long index);
16 void item_free(struct item *item, unsigned long index);
17 int item_delete(struct radix_tree_root *root, unsigned long index);
18 int item_delete_rcu(struct xarray *xa, unsigned long index);
19 struct item *item_lookup(struct radix_tree_root *root, unsigned long index);
21 void item_check_present(struct radix_tree_root *root, unsigned long index);
22 void item_check_absent(struct radix_tree_root *root, unsigned long index);
[all …]
Dregression3.c45 printv(2, "tagged %ld %p\n", iter.index, *slot); in regression3_test()
52 printv(2, "retry at %ld\n", iter.index); in regression3_test()
61 printv(2, "slot %ld %p\n", iter.index, *slot); in regression3_test()
67 printv(2, "retry at %ld\n", iter.index); in regression3_test()
74 printv(2, "slot %ld %p\n", iter.index, *slot); in regression3_test()
75 if (!iter.index) { in regression3_test()
76 printv(2, "next at %ld\n", iter.index); in regression3_test()
84 printv(2, "tagged %ld %p\n", iter.index, *slot); in regression3_test()
85 if (!iter.index) { in regression3_test()
86 printv(2, "next at %ld\n", iter.index); in regression3_test()
Dbenchmark.c56 unsigned long index; in benchmark_insert() local
61 for (index = 0 ; index < size ; index += step) in benchmark_insert()
62 item_insert(root, index); in benchmark_insert()
77 unsigned long index; in benchmark_tagging() local
82 for (index = 0 ; index < size ; index += step) in benchmark_tagging()
83 radix_tree_tag_set(root, index, 0); in benchmark_tagging()
98 unsigned long index; in benchmark_delete() local
103 for (index = 0 ; index < size ; index += step) in benchmark_delete()
104 item_delete(root, index); in benchmark_delete()
Dmultiorder.c15 static int item_insert_order(struct xarray *xa, unsigned long index, in item_insert_order() argument
18 XA_STATE_ORDER(xas, xa, index, order); in item_insert_order()
19 struct item *item = item_create(index, order); in item_insert_order()
41 int index[NUM_ENTRIES] = {0, 2, 4, 8, 16, 32, 34, 36, 64, 72, 128}; in multiorder_iteration() local
47 err = item_insert_order(xa, index[i], order[i]); in multiorder_iteration()
53 if (j <= (index[i] | ((1 << order[i]) - 1))) in multiorder_iteration()
62 assert((xas.xa_index | mask) == (index[i] | mask)); in multiorder_iteration()
65 assert((item->index | mask) == (index[i] | mask)); in multiorder_iteration()
81 int index[MT_NUM_ENTRIES] = {0, 2, 4, 16, 32, 40, 64, 72, 128}; in multiorder_tagged_iteration() local
90 assert(!item_insert_order(xa, index[i], order[i])); in multiorder_tagged_iteration()
[all …]
Diteration_check.c21 void my_item_insert(struct xarray *xa, unsigned long index) in my_item_insert() argument
23 XA_STATE(xas, xa, index); in my_item_insert()
24 struct item *item = item_create(index, 0); in my_item_insert()
30 xas_set_order(&xas, index, order); in my_item_insert()
Dregression1.c52 unsigned long index; member
55 static struct page *page_alloc(int index) in page_alloc() argument
60 p->index = index; in page_alloc()
/tools/testing/selftests/bpf/progs/
Dtest_global_func_args.c20 static void save_value(__u32 index, int value) in save_value() argument
22 bpf_map_update_elem(&values, &index, &value, 0); in save_value()
25 __noinline int foo(__u32 index, struct S *s) in foo() argument
28 save_value(index, s->v); in foo()
32 save_value(index, 0); in foo()
37 __noinline int bar(__u32 index, volatile struct S *s) in bar() argument
40 save_value(index, s->v); in bar()
44 save_value(index, 0); in bar()
60 __u32 index = 0; in test_cls() local
63 const int v = foo(index++, 0); in test_cls()
[all …]
/tools/virtio/ringtest/
Dring.c35 unsigned short index; member
99 .index = i, in alloc_ring()
114 unsigned head, index; in add_inbuf() local
133 index = ring[head].index; in add_inbuf()
134 data[index].buf = buf; in add_inbuf()
135 data[index].data = datap; in add_inbuf()
146 unsigned index; in get_buf() local
154 index = ring[head].index & (ring_size - 1); in get_buf()
155 datap = data[index].data; in get_buf()
156 *bufp = data[index].buf; in get_buf()
[all …]
Dvirtio_ring_0_9.c155 unsigned index; in get_buf() local
160 index = ring.used->ring[head].id; in get_buf()
161 if ((index ^ guest.last_used_idx ^ 0x8000) & ~(ring_size - 1)) in get_buf()
165 index &= ring_size - 1; in get_buf()
173 index = head; in get_buf()
176 index = ring.used->ring[head].id; in get_buf()
181 *lenp = ring.desc[index].len; in get_buf()
185 datap = data[index].data; in get_buf()
186 *bufp = (void*)(unsigned long)ring.desc[index].addr; in get_buf()
187 data[index].data = NULL; in get_buf()
[all …]
/tools/perf/ui/browsers/
Dscripts.c29 int index; member
52 c->names[c->index] = name; in add_script_option()
53 if (asprintf(&c->paths[c->index], in add_script_option()
58 c->index++; in add_script_option()
68 if (c->index >= SCRIPT_MAX_NO) in scripts_config()
70 c->names[c->index] = strdup(var + 7); in scripts_config()
71 if (!c->names[c->index]) in scripts_config()
73 if (asprintf(&c->paths[c->index], "%s %s", value, in scripts_config()
76 c->index++; in scripts_config()
115 custom_perf = scriptc.index; in list_scripts()
[all …]
/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c398 uint16_t index[4]; in nested_pg_map() local
421 index[0] = (nested_paddr >> 12) & 0x1ffu; in nested_pg_map()
422 index[1] = (nested_paddr >> 21) & 0x1ffu; in nested_pg_map()
423 index[2] = (nested_paddr >> 30) & 0x1ffu; in nested_pg_map()
424 index[3] = (nested_paddr >> 39) & 0x1ffu; in nested_pg_map()
428 if (!pml4e[index[3]].readable) { in nested_pg_map()
429 pml4e[index[3]].address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_pg_map()
430 pml4e[index[3]].writable = true; in nested_pg_map()
431 pml4e[index[3]].readable = true; in nested_pg_map()
432 pml4e[index[3]].executable = true; in nested_pg_map()
[all …]
Dprocessor.c161 int index = vaddr >> (vm->page_shift + level * 9) & 0x1ffu; in virt_get_pte() local
163 return &page_table[index]; in virt_get_pte()
252 uint16_t index[4]; in _vm_get_page_table_entry() local
290 index[0] = (vaddr >> 12) & 0x1ffu; in _vm_get_page_table_entry()
291 index[1] = (vaddr >> 21) & 0x1ffu; in _vm_get_page_table_entry()
292 index[2] = (vaddr >> 30) & 0x1ffu; in _vm_get_page_table_entry()
293 index[3] = (vaddr >> 39) & 0x1ffu; in _vm_get_page_table_entry()
296 TEST_ASSERT(pml4e[index[3]] & PTE_PRESENT_MASK, in _vm_get_page_table_entry()
298 TEST_ASSERT((pml4e[index[3]] & (rsvd_mask | PTE_LARGE_MASK)) == 0, in _vm_get_page_table_entry()
301 pdpe = addr_gpa2hva(vm, PTE_GET_PFN(pml4e[index[3]]) * vm->page_size); in _vm_get_page_table_entry()
[all …]
/tools/testing/selftests/kvm/x86_64/
Dget_cpuid_test.c20 u32 index; member
26 {.function = 0xd, .index = 0},
27 {.function = 0xd, .index = 1},
37 ecx = guest_cpuid->entries[i].index; in test_guest_cpuids()
77 mangled_cpuids[i].index == entrie->index) in is_cpuid_mangled()
90 cpuid->entries[i].index == entrie->index) { in check_cpuid()
99 entrie->function, entrie->index, in check_cpuid()
107 TEST_ASSERT(false, "CPUID 0x%x.%x not found", entrie->function, entrie->index); in check_cpuid()
Duserspace_msr_exit_test.c428 TEST_ASSERT(run->msr.index == msr_index, in process_rdmsr()
430 run->msr.index, msr_index); in process_rdmsr()
432 switch (run->msr.index) { in process_rdmsr()
449 TEST_ASSERT(false, "Unexpected MSR: 0x%04x", run->msr.index); in process_rdmsr()
463 TEST_ASSERT(run->msr.index == msr_index, in process_wrmsr()
465 run->msr.index, msr_index); in process_wrmsr()
467 switch (run->msr.index) { in process_wrmsr()
480 TEST_ASSERT(false, "Unexpected MSR: 0x%04x", run->msr.index); in process_wrmsr()
641 run->msr.data = run->msr.index; in handle_rdmsr()
644 if (run->msr.index == MSR_SYSCALL_MASK || in handle_rdmsr()
[all …]
/tools/arch/x86/kcpuid/
Dkcpuid.c45 u32 index; member
122 if (has_subleafs(leaf->index)) { in leaf_print_raw()
124 printf("0x%08x: subleafs:\n", leaf->index); in leaf_print_raw()
130 leaf->index, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx); in leaf_print_raw()
168 leaf->index = f; in cpuid_store()
188 u32 index = f; in raw_dump_range() local
191 index += 0x80000000; in raw_dump_range()
294 u32 index; in parse_line() local
331 index = strtoull(tokens[0], NULL, 0); in parse_line()
333 if (index & 0x80000000) in parse_line()
[all …]
/tools/testing/selftests/arm64/mte/
Dmte_common_util.c175 int index; in mte_allocate_file_memory() local
184 for (index = INIT_BUFFER_SIZE; index < size; index += INIT_BUFFER_SIZE) { in mte_allocate_file_memory()
190 index -= INIT_BUFFER_SIZE; in mte_allocate_file_memory()
191 if (write(fd, buffer, size - index) != size - index) { in mte_allocate_file_memory()
201 int index; in mte_allocate_file_memory_tag_range() local
211 for (index = INIT_BUFFER_SIZE; index < map_size; index += INIT_BUFFER_SIZE) in mte_allocate_file_memory_tag_range()
216 index -= INIT_BUFFER_SIZE; in mte_allocate_file_memory_tag_range()
217 if (write(fd, buffer, map_size - index) != map_size - index) { in mte_allocate_file_memory_tag_range()
/tools/testing/selftests/ptp/
Dtestptp.c58 static void do_flag_test(int fd, unsigned int index) in do_flag_test() argument
75 extts_request.index = index; in do_flag_test()
172 int index = 0; in main() local
210 index = atoi(optarg); in main()
359 extts_request.index = index; in main()
373 printf("event index %u at %lld.%09u\n", event.index, in main()
385 do_flag_test(fd, index); in main()
396 desc.index = i; in main()
402 desc.name, desc.index, desc.func, desc.chan); in main()
422 perout_request.index = index; in main()
[all …]
/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/
Dtc_flower.sh241 local index
250 index=$((BASE_INDEX - i))
261 "tc filter add dev $h2 ingress protocol ip pref $index \
262 handle $index \
273 tc_check_packets "dev $h2 ingress" $index 1
278 index=$((BASE_INDEX - i))
283 tc_check_packets "dev $h2 ingress" $index 2
286 tc filter del dev $h2 ingress protocol ip pref $index \
287 handle $index flower
656 local index=$3
[all …]
/tools/vm/
Dpage-types.c256 unsigned long index, in do_u64_read() argument
261 if (index > ULONG_MAX / 8) in do_u64_read()
262 fatal("index overflow: %lu\n", index); in do_u64_read()
264 bytes = pread(fd, buf, count * 8, (off_t)index * 8); in do_u64_read()
276 unsigned long index, in kpageflags_read() argument
279 return do_u64_read(kpageflags_fd, opt_kpageflags, buf, index, pages); in kpageflags_read()
283 unsigned long index, in kpagecgroup_read() argument
289 return do_u64_read(kpagecgroup_fd, opt_kpageflags, buf, index, pages); in kpagecgroup_read()
293 unsigned long index, in kpagecount_read() argument
298 buf, index, pages); in kpagecount_read()
[all …]
/tools/perf/util/arm-spe-decoder/
Darm-spe-decoder.c25 static u64 arm_spe_calc_ip(int index, u64 payload) in arm_spe_calc_ip() argument
30 if (index == SPE_ADDR_PKT_HDR_INDEX_INS || in arm_spe_calc_ip()
31 index == SPE_ADDR_PKT_HDR_INDEX_BRANCH) { in arm_spe_calc_ip()
43 } else if (index == SPE_ADDR_PKT_HDR_INDEX_DATA_VIRT) { in arm_spe_calc_ip()
67 } else if (index == SPE_ADDR_PKT_HDR_INDEX_DATA_PHYS) { in arm_spe_calc_ip()
71 pr_err("unsupported address packet index: 0x%x\n", index); in arm_spe_calc_ip()
160 idx = decoder->packet.index; in arm_spe_read_record()
Darm-spe-pkt-decoder.c123 packet->index = arm_spe_payload_len(buf[0]); in arm_spe_get_events()
139 packet->index = SPE_CTX_PKT_HDR_INDEX(buf[0]); in arm_spe_get_context()
147 packet->index = SPE_OP_PKT_HDR_CLASS(buf[0]); in arm_spe_get_op_type()
157 packet->index = SPE_HDR_EXTENDED_INDEX(buf[0], buf[1]); in arm_spe_get_counter()
159 packet->index = SPE_HDR_SHORT_INDEX(buf[0]); in arm_spe_get_counter()
170 packet->index = SPE_HDR_EXTENDED_INDEX(buf[0], buf[1]); in arm_spe_get_addr()
172 packet->index = SPE_HDR_SHORT_INDEX(buf[0]); in arm_spe_get_addr()
338 switch (packet->index) { in arm_spe_pkt_desc_op_type()
421 int ns, el, idx = packet->index; in arm_spe_pkt_desc_addr()
468 switch (packet->index) { in arm_spe_pkt_desc_counter()
[all …]
/tools/testing/selftests/tc-testing/
Dtdc_batch.py99 index = 0 variable
106 cmd = formatter(device, prio, handle_start + index, skip, src_mac,
109 index += 1
110 if index >= number:
/tools/perf/ui/
Dbrowser.c191 return browser->top_idx + row == browser->index; in ui_browser__is_current_entry()
258 browser->index = browser->top_idx = 0; in ui_browser__reset_index()
317 pct = ((browser->index * (browser->height - 1)) / in ui_browser__scrollbar_set()
378 browser->index += offset; in ui_browser__update_nr_entries()
424 if (browser->index == browser->nr_entries - 1) in ui_browser__run()
426 ++browser->index; in ui_browser__run()
427 if (browser->index == browser->top_idx + browser->rows) { in ui_browser__run()
433 if (browser->index == 0) in ui_browser__run()
435 --browser->index; in ui_browser__run()
436 if (browser->index < browser->top_idx) { in ui_browser__run()
[all …]

123456