Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 131) sorted by relevance

123456

/tools/testing/selftests/kvm/x86_64/
Dvmx_set_nested_state_test.c30 void test_nested_state(struct kvm_vm *vm, struct kvm_nested_state *state) in test_nested_state() argument
32 vcpu_nested_state_set(vm, VCPU_ID, state, false); in test_nested_state()
36 struct kvm_nested_state *state, in test_nested_state_expect_errno() argument
41 rv = vcpu_nested_state_set(vm, VCPU_ID, state, true); in test_nested_state_expect_errno()
49 struct kvm_nested_state *state) in test_nested_state_expect_einval() argument
51 test_nested_state_expect_errno(vm, state, EINVAL); in test_nested_state_expect_einval()
55 struct kvm_nested_state *state) in test_nested_state_expect_efault() argument
57 test_nested_state_expect_errno(vm, state, EFAULT); in test_nested_state_expect_efault()
60 void set_revision_id_for_vmcs12(struct kvm_nested_state *state, in set_revision_id_for_vmcs12() argument
64 memcpy(&state->data, &vmcs12_revision, sizeof(u32)); in set_revision_id_for_vmcs12()
[all …]
Dsmm_test.c99 struct kvm_x86_state *state; in main() local
152 state = vcpu_save_state(vm, VCPU_ID); in main()
157 vcpu_load_state(vm, VCPU_ID, state); in main()
159 free(state); in main()
Devmcs_test.c88 struct kvm_x86_state *state; in main() local
138 state = vcpu_save_state(vm, VCPU_ID); in main()
149 vcpu_load_state(vm, VCPU_ID, state); in main()
151 free(state); in main()
/tools/usb/ffs-aio-example/multibuff/host_app/
Dtest.c59 int test_init(struct test_state *state) in test_init() argument
65 state->found = NULL; in test_init()
66 state->ctx = NULL; in test_init()
67 state->handle = NULL; in test_init()
68 state->attached = 0; in test_init()
70 ret = libusb_init(&state->ctx); in test_init()
76 cnt = libusb_get_device_list(state->ctx, &list); in test_init()
92 state->found = dev; in test_init()
97 if (!state->found) { in test_init()
102 ret = libusb_open(state->found, &state->handle); in test_init()
[all …]
/tools/usb/ffs-aio-example/simple/host_app/
Dtest.c59 int test_init(struct test_state *state) in test_init() argument
65 state->found = NULL; in test_init()
66 state->ctx = NULL; in test_init()
67 state->handle = NULL; in test_init()
68 state->attached = 0; in test_init()
70 ret = libusb_init(&state->ctx); in test_init()
76 cnt = libusb_get_device_list(state->ctx, &list); in test_init()
92 state->found = dev; in test_init()
97 if (!state->found) { in test_init()
102 ret = libusb_open(state->found, &state->handle); in test_init()
[all …]
/tools/perf/util/
Dtrigger.h32 } state; member
37 WARN_ONCE(t->state != exp, "trigger '%s' state transist error: %d in %s()\n", \
38 t->name, t->state, __func__)
42 return t->state >= 0; in trigger_is_available()
47 return t->state <= TRIGGER_ERROR; in trigger_is_error()
53 t->state = TRIGGER_ON; in trigger_on()
60 t->state = TRIGGER_READY; in trigger_ready()
68 t->state = TRIGGER_HIT; in trigger_hit()
75 t->state = TRIGGER_OFF; in trigger_off()
80 t->state = TRIGGER_ERROR; in trigger_error()
[all …]
Dsrccode.h9 static inline void srccode_state_init(struct srccode_state *state) in srccode_state_init() argument
11 state->srcfile = NULL; in srccode_state_init()
12 state->line = 0; in srccode_state_init()
15 void srccode_state_free(struct srccode_state *state);
Dintel-pt.c151 const struct intel_pt_state *state; member
1137 if (ptq->state->flags & INTEL_PT_ABORT_TX) { in intel_pt_sample_flags()
1139 } else if (ptq->state->flags & INTEL_PT_ASYNC) { in intel_pt_sample_flags()
1140 if (ptq->state->to_ip) in intel_pt_sample_flags()
1149 if (ptq->state->from_ip) in intel_pt_sample_flags()
1150 ptq->flags = intel_pt_insn_type(ptq->state->insn_op); in intel_pt_sample_flags()
1154 if (ptq->state->flags & INTEL_PT_IN_TX) in intel_pt_sample_flags()
1156 ptq->insn_len = ptq->state->insn_len; in intel_pt_sample_flags()
1157 memcpy(ptq->insn, ptq->state->insn, INTEL_PT_INSN_BUF_SZ); in intel_pt_sample_flags()
1160 if (ptq->state->type & INTEL_PT_TRACE_BEGIN) in intel_pt_sample_flags()
[all …]
/tools/power/cpupower/utils/idle_monitor/
Dcpuidle_sysfs.c46 int cpu, state; in cpuidle_start() local
49 for (state = 0; state < cpuidle_sysfs_monitor.hw_states_num; in cpuidle_start()
50 state++) { in cpuidle_start()
51 previous_count[cpu][state] = in cpuidle_start()
52 cpuidle_state_time(cpu, state); in cpuidle_start()
54 cpu, state, previous_count[cpu][state]); in cpuidle_start()
62 int cpu, state; in cpuidle_stop() local
68 for (state = 0; state < cpuidle_sysfs_monitor.hw_states_num; in cpuidle_stop()
69 state++) { in cpuidle_stop()
70 current_count[cpu][state] = in cpuidle_stop()
[all …]
Damd_fam14h_idle.c96 static int amd_fam14h_get_pci_info(struct cstate *state, in amd_fam14h_get_pci_info() argument
101 switch (state->id) { in amd_fam14h_get_pci_info()
124 static int amd_fam14h_init(cstate_t *state, unsigned int cpu) in amd_fam14h_init() argument
129 ret = amd_fam14h_get_pci_info(state, &pci_offset, &enable_bit, cpu); in amd_fam14h_init()
134 if (state->id == NBP1) { in amd_fam14h_init()
143 dprint("Init %s: read at offset: 0x%x val: %u\n", state->name, in amd_fam14h_init()
149 state->name, PCI_MONITOR_ENABLE_REG, enable_bit, in amd_fam14h_init()
154 previous_count[state->id][cpu] = 0; in amd_fam14h_init()
159 static int amd_fam14h_disable(cstate_t *state, unsigned int cpu) in amd_fam14h_disable() argument
164 ret = amd_fam14h_get_pci_info(state, &pci_offset, &enable_bit, cpu); in amd_fam14h_disable()
[all …]
Dcpupower-monitor.c98 int state, need_len; in print_header() local
126 for (state = 0; state < monitors[mon]->hw_states_num; state++) { in print_header()
127 if (state != 0) in print_header()
129 s = monitors[mon]->hw_states[state]; in print_header()
143 int state, ret; in print_results() local
166 for (state = 0; state < monitors[mon]->hw_states_num; state++) { in print_results()
167 if (state != 0) in print_results()
170 s = monitors[mon]->hw_states[state]; in print_results()
260 int state; in list_monitors() local
269 for (state = 0; state < monitors[mon]->hw_states_num; state++) { in list_monitors()
[all …]
/tools/testing/selftests/powerpc/security/
Dbranch_loops.S25 .macro state number macro
54 state 0
55 state 1
56 state 2
57 state 3
58 state 4
59 state 5
60 state 6
61 state 7
Dspectre_v2.c87 enum spectre_v2_state state = UNKNOWN; in get_sysfs_state() local
106 state = VULNERABLE; in get_sysfs_state()
108 state = NOT_AFFECTED; in get_sysfs_state()
110 state = BRANCH_SERIALISATION; in get_sysfs_state()
112 state = COUNT_CACHE_DISABLED; in get_sysfs_state()
114 state = COUNT_CACHE_FLUSH_HW; in get_sysfs_state()
116 state = COUNT_CACHE_FLUSH_SW; in get_sysfs_state()
118 state = BTB_FLUSH; in get_sysfs_state()
120 return state; in get_sysfs_state()
132 enum spectre_v2_state state; in spectre_v2_test() local
[all …]
/tools/testing/selftests/bpf/
Dbench.c140 static error_t parse_arg(int key, char *arg, struct argp_state *state) in parse_arg() argument
155 argp_usage(state); in parse_arg()
162 argp_usage(state); in parse_arg()
169 argp_usage(state); in parse_arg()
176 argp_usage(state); in parse_arg()
187 argp_usage(state); in parse_arg()
195 argp_usage(state); in parse_arg()
202 argp_usage(state); in parse_arg()
302 } state; variable
370 state.producers = calloc(env.producer_cnt, sizeof(*state.producers)); in setup_benchmark()
[all …]
/tools/perf/util/intel-pt-decoder/
Dintel-pt-decoder.c109 struct intel_pt_state state; member
553 decoder->state.trace_nr = buffer.trace_nr; in intel_pt_get_data()
1003 decoder->state.type |= INTEL_PT_INSTRUCTION; in intel_pt_sample_insn()
1044 decoder->state.type = INTEL_PT_INSTRUCTION; in intel_pt_walk_insn()
1045 decoder->state.from_ip = decoder->ip; in intel_pt_walk_insn()
1046 decoder->state.to_ip = 0; in intel_pt_walk_insn()
1068 decoder->state.from_ip = decoder->ip; in intel_pt_walk_insn()
1071 decoder->state.to_ip = decoder->ip; in intel_pt_walk_insn()
1083 decoder->stuck_ip = decoder->state.to_ip; in intel_pt_walk_insn()
1087 decoder->state.to_ip == decoder->stuck_ip) { in intel_pt_walk_insn()
[all …]
/tools/testing/selftests/x86/
Dunwind_vdso.c70 struct unwind_state *state = opaque; in trace_fn() local
73 if (state->depth == -1) { in trace_fn()
74 if (ip == state->ip) in trace_fn()
75 state->depth = 0; in trace_fn()
102 state->depth++; in trace_fn()
110 struct unwind_state state; in sigtrap() local
134 state.ip = ip; in sigtrap()
135 state.depth = -1; in sigtrap()
136 _Unwind_Backtrace(trace_fn, &state); in sigtrap()
/tools/laptop/dslm/
Ddslm.c32 int state; in check_powermode() local
38 state = -1; /* "unknown"; */ in check_powermode()
40 state = 0; /* "sleeping"; */ in check_powermode()
42 state = (args[2] == 255) ? 1 : 0; in check_powermode()
44 D(printf(" drive state is: %d\n", state)); in check_powermode()
46 return state; in check_powermode()
/tools/perf/tests/
Dcode-reading.c39 struct state { struct
237 struct thread *thread, struct state *state) in read_object_code() argument
297 for (d = 0; d < state->done_cnt; d++) { in read_object_code()
298 if (state->done[d] == al.map->start) { in read_object_code()
304 if (state->done_cnt >= ARRAY_SIZE(state->done)) { in read_object_code()
308 state->done[state->done_cnt++] = al.map->start; in read_object_code()
375 union perf_event *event, struct state *state) in process_sample_event() argument
392 ret = read_object_code(sample.ip, READLEN, sample.cpumode, thread, state); in process_sample_event()
398 union perf_event *event, struct state *state) in process_event() argument
401 return process_sample_event(machine, evlist, event, state); in process_event()
[all …]
/tools/lib/traceevent/
Dtrace-seq.c26 (s)->state = TRACE_SEQ__BUFFER_POISONED; \
32 if ((s)->state != TRACE_SEQ__GOOD) \
50 s->state = TRACE_SEQ__GOOD; in trace_seq_init()
52 s->state = TRACE_SEQ__MEM_ALLOC_FAILED; in trace_seq_init()
89 s->state = TRACE_SEQ__MEM_ALLOC_FAILED; in expand_buffer()
233 switch (s->state) { in trace_seq_do_fprintf()
/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c964 struct kvm_x86_state *state; in vcpu_save_state() local
970 TEST_ASSERT(nested_size <= sizeof(state->nested_), in vcpu_save_state()
972 nested_size, sizeof(state->nested_)); in vcpu_save_state()
990 state = malloc(sizeof(*state) + nmsrs * sizeof(state->msrs.entries[0])); in vcpu_save_state()
991 r = ioctl(vcpu->fd, KVM_GET_VCPU_EVENTS, &state->events); in vcpu_save_state()
995 r = ioctl(vcpu->fd, KVM_GET_MP_STATE, &state->mp_state); in vcpu_save_state()
999 r = ioctl(vcpu->fd, KVM_GET_REGS, &state->regs); in vcpu_save_state()
1003 r = ioctl(vcpu->fd, KVM_GET_XSAVE, &state->xsave); in vcpu_save_state()
1008 r = ioctl(vcpu->fd, KVM_GET_XCRS, &state->xcrs); in vcpu_save_state()
1013 r = ioctl(vcpu->fd, KVM_GET_SREGS, &state->sregs); in vcpu_save_state()
[all …]
/tools/testing/selftests/netfilter/
Dconntrack_icmp_related.sh138 meta l4proto icmpv6 icmpv6 type "packet-too-big" ct state "related" counter name "related" accept
139 …meta l4proto icmp icmp type "destination-unreachable" ct state "related" counter name "related" ac…
140 meta l4proto { icmp, icmpv6 } ct state new,established accept
156 icmp type "redirect" ct state "related" counter name "redir4" accept
157 icmpv6 type "nd-redirect" ct state "related" counter name "redir6" accept
159 meta l4proto { icmp, icmpv6 } ct state established,untracked accept
160 meta l4proto { icmp, icmpv6 } ct state "related" counter name "related" accept
175 meta l4proto { icmp, icmpv6 } ct state established,untracked accept
177 meta l4proto { icmp, icmpv6 } ct state "new" counter name "new" accept
178 meta l4proto { icmp, icmpv6 } ct state "established" counter name "established" accept
[all …]
/tools/testing/selftests/memory-hotplug/
Dmem-on-off-test.sh41 local state=${1:-.\*}
45 grep -q $state $memory/state; then
63 grep -q online $SYSFS/devices/system/memory/memory$1/state
68 grep -q offline $SYSFS/devices/system/memory/memory$1/state
73 echo online > $SYSFS/devices/system/memory/memory$1/state
78 echo offline > $SYSFS/devices/system/memory/memory$1/state
/tools/objtool/
Dcheck.c262 static void init_insn_state(struct insn_state *state, struct section *sec) in init_insn_state() argument
264 memset(state, 0, sizeof(*state)); in init_insn_state()
265 init_cfi_state(&state->cfi); in init_insn_state()
273 state->noinstr = sec->noinstr; in init_insn_state()
1821 static void set_func_state(struct cfi_state *state) in set_func_state() argument
1823 state->cfa = initial_func_cfi.cfa; in set_func_state()
1824 memcpy(&state->regs, &initial_func_cfi.regs, in set_func_state()
1826 state->stack_size = initial_func_cfi.cfa.offset; in set_func_state()
2202 static bool has_modified_stack_frame(struct instruction *insn, struct insn_state *state) in has_modified_stack_frame() argument
2204 struct cfi_state *cfi = &state->cfi; in has_modified_stack_frame()
[all …]
/tools/bpf/runqslower/
Drunqslower.c44 static error_t parse_arg(int key, char *arg, struct argp_state *state) in parse_arg() argument
59 argp_usage(state); in parse_arg()
67 argp_usage(state); in parse_arg()
73 argp_usage(state); in parse_arg()
/tools/testing/selftests/cpufreq/
Dcpufreq.sh211 if [ ! -d $SYSFS/power/ -o ! -f $SYSFS/power/state ]; then
226 present=$(cat $SYSFS/power/state | grep $filename)
235 echo $filename > $SYSFS/power/state

123456