Home
last modified time | relevance | path

Searched refs:caps (Results 1 – 25 of 26) sorted by relevance

12

/tools/power/cpupower/utils/helpers/
Dcpuid.c60 cpu_info->caps = 0; in get_cpu_info()
122 cpu_info->caps |= CPUPOWER_CAP_INV_TSC; in get_cpu_info()
126 cpu_info->caps |= CPUPOWER_CAP_APERF; in get_cpu_info()
133 cpu_info->caps |= CPUPOWER_CAP_AMD_CPB; in get_cpu_info()
136 cpu_info->caps |= CPUPOWER_CAP_AMD_CPB_MSR; in get_cpu_info()
142 cpu_info->caps |= CPUPOWER_CAP_AMD_HW_PSTATE; in get_cpu_info()
145 cpu_info->caps |= CPUPOWER_CAP_AMD_PSTATEDEF; in get_cpu_info()
151 cpu_info->caps |= CPUPOWER_CAP_AMD_RDPRU; in get_cpu_info()
157 cpu_info->caps |= CPUPOWER_CAP_INTEL_IDA; in get_cpu_info()
163 cpu_info->caps |= CPUPOWER_CAP_PERF_BIAS; in get_cpu_info()
[all …]
Dmisc.c24 if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_CPB) { in cpufreq_has_boost_support()
32 if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_CPB_MSR) { in cpufreq_has_boost_support()
42 } else if (cpupower_cpu_info.caps & CPUPOWER_CAP_INTEL_IDA) in cpufreq_has_boost_support()
54 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_PERF_BIAS)) in cpupower_intel_get_perf_bias()
74 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_PERF_BIAS)) in cpupower_intel_set_perf_bias()
Damd.c48 if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_PSTATEDEF) in get_did()
64 if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_PSTATEDEF) { in get_cof()
99 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_HW_PSTATE)) in decode_pstates()
Dmsr.c80 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_HAS_TURBO_RATIO)) in msr_intel_get_turbo_ratio()
Dhelpers.h87 unsigned long long caps; member
/tools/build/feature/
Dtest-libcap.c8 cap_t caps = cap_get_proc(); in main() local
10 if (!caps) in main()
13 if (cap_get_flag(caps, CAP_SYS_ADMIN, CAP_EFFECTIVE, &val) != 0) in main()
16 if (cap_free(caps) != 0) in main()
Dtest-jvmti.c8 jvmtiCapabilities caps __attribute__((unused)); in main() local
/tools/perf/util/
Dcap.c15 cap_t caps = cap_get_proc(); in perf_cap__capable() local
17 if (!caps) in perf_cap__capable()
20 if (cap_get_flag(caps, cap, CAP_EFFECTIVE, &val) != 0) in perf_cap__capable()
23 if (cap_free(caps) != 0) in perf_cap__capable()
Dpmu.c1033 INIT_LIST_HEAD(&pmu->caps); in pmu_lookup()
1846 struct perf_pmu_caps *caps = zalloc(sizeof(*caps)); in perf_pmu__new_caps() local
1848 if (!caps) in perf_pmu__new_caps()
1851 caps->name = strdup(name); in perf_pmu__new_caps()
1852 if (!caps->name) in perf_pmu__new_caps()
1854 caps->value = strndup(value, strlen(value) - 1); in perf_pmu__new_caps()
1855 if (!caps->value) in perf_pmu__new_caps()
1857 list_add_tail(&caps->list, list); in perf_pmu__new_caps()
1861 zfree(&caps->name); in perf_pmu__new_caps()
1863 free(caps); in perf_pmu__new_caps()
[all …]
Dpmu.h50 struct list_head caps; /* HEAD struct perf_pmu_caps -> list */ member
Dheader.c1466 struct perf_pmu_caps *caps = NULL; in write_per_cpu_pmu_caps() local
1478 list_for_each_entry(caps, &pmu->caps, list) { in write_per_cpu_pmu_caps()
1479 ret = do_write_string(ff, caps->name); in write_per_cpu_pmu_caps()
1483 ret = do_write_string(ff, caps->value); in write_per_cpu_pmu_caps()
/tools/testing/selftests/clone3/
Dclone3_cap_checkpoint_restore.c104 cap_t caps; in set_capability() local
106 caps = cap_get_proc(); in set_capability()
107 if (!caps) { in set_capability()
113 if (cap_clear(caps)) { in set_capability()
118 cap_set_flag(caps, CAP_EFFECTIVE, 2, cap_values, CAP_SET); in set_capability()
119 cap_set_flag(caps, CAP_PERMITTED, 2, cap_values, CAP_SET); in set_capability()
121 cap = (struct libcap *) caps; in set_capability()
127 if (cap_set_proc(caps)) { in set_capability()
133 if (cap_free(caps)) in set_capability()
/tools/testing/selftests/bpf/prog_tests/
Dbind_perm.c57 cap_t caps; in cap_net_bind_service() local
59 caps = cap_get_proc(); in cap_net_bind_service()
60 if (CHECK(!caps, "cap_get_proc", "errno %d", errno)) in cap_net_bind_service()
63 if (CHECK(cap_get_flag(caps, CAP_NET_BIND_SERVICE, CAP_EFFECTIVE, in cap_net_bind_service()
70 if (CHECK(cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_net_bind_service, in cap_net_bind_service()
75 if (CHECK(cap_set_proc(caps), "cap_set_proc", "errno %d", errno)) in cap_net_bind_service()
79 CHECK(cap_free(caps), "cap_free", "errno %d", errno); in cap_net_bind_service()
/tools/testing/selftests/landlock/
Dcommon.h113 const cap_value_t caps[] = { in _init_caps() local
131 ARRAY_SIZE(caps), caps, CAP_SET)) in _init_caps()
160 const cap_value_t caps, const cap_flag_value_t value) in _effective_cap() argument
169 EXPECT_NE(-1, cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &caps, value)) in _effective_cap()
184 set_cap(struct __test_metadata *const _metadata, const cap_value_t caps) in set_cap() argument
186 _effective_cap(_metadata, caps, CAP_SET); in set_cap()
190 clear_cap(struct __test_metadata *const _metadata, const cap_value_t caps) in clear_cap() argument
192 _effective_cap(_metadata, caps, CAP_CLEAR); in clear_cap()
/tools/testing/selftests/ptp/
Dtestptp.c150 struct ptp_clock_caps caps; in main() local
274 if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { in main()
286 caps.max_adj, in main()
287 caps.n_alarm, in main()
288 caps.n_ext_ts, in main()
289 caps.n_per_out, in main()
290 caps.pps, in main()
291 caps.n_pins, in main()
292 caps.cross_timestamping, in main()
293 caps.adjust_phase); in main()
[all …]
/tools/testing/selftests/safesetid/
Dsafesetid-test.c273 cap_t caps; in drop_caps() local
275 caps = cap_get_proc(); in drop_caps()
277 cap_set_flag(caps, CAP_EFFECTIVE, 2, cap_values, CAP_SET); in drop_caps()
279 cap_clear(caps); in drop_caps()
280 cap_set_proc(caps); in drop_caps()
281 cap_free(caps); in drop_caps()
/tools/testing/selftests/bpf/
Dtest_verifier.c943 cap_t caps; in set_admin() local
950 caps = cap_get_proc(); in set_admin()
951 if (!caps) { in set_admin()
955 cap = (struct libcap *)caps; in set_admin()
956 if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_sys_admin, CAP_CLEAR)) { in set_admin()
960 if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap_net_admin, in set_admin()
975 if (cap_set_proc(caps)) { in set_admin()
981 if (cap_free(caps)) in set_admin()
1253 cap_t caps; in is_admin() local
1261 caps = cap_get_proc(); in is_admin()
[all …]
/tools/bpf/bpftool/
Dfeature.c798 cap_t caps; in handle_perms() local
800 caps = cap_get_proc(); in handle_perms()
801 if (!caps) { in handle_perms()
816 if (cap_get_flag(caps, cap, CAP_EFFECTIVE, &val)) { in handle_perms()
862 if (cap_set_flag(caps, CAP_EFFECTIVE, nb_bpf_caps, cap_list, in handle_perms()
868 if (cap_set_proc(caps)) { in handle_perms()
876 if (cap_free(caps) && !res) { in handle_perms()
/tools/power/cpupower/utils/idle_monitor/
Dmperf_monitor.c110 if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_RDPRU) { in get_aperf_mperf()
273 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC)) in init_maxfreq_mode()
335 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_APERF)) in mperf_register()
Dnhm_idle.c173 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC)) in intel_nhm_register()
176 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_APERF)) in intel_nhm_register()
/tools/arch/x86/include/asm/
Damd-ibs.h129 u32 caps; member
/tools/power/cpupower/utils/
Dcpupower-info.c82 } else if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_PERF_BIAS)) { in cmd_info()
Dcpufreq-info.c205 } else if (cpupower_cpu_info.caps & CPUPOWER_CAP_HAS_TURBO_RATIO) { in get_boost_mode_x86()
211 if (cpupower_cpu_info.caps & CPUPOWER_CAP_IS_SNB) in get_boost_mode_x86()
/tools/perf/Documentation/
Dperf-intel-pt.txt315 /sys/bus/event_source/devices/intel_pt/caps/psb_cyc
322 /sys/bus/event_source/devices/intel_pt/caps/psb_periods
359 /sys/bus/event_source/devices/intel_pt/caps/mtc
372 /sys/bus/event_source/devices/intel_pt/caps/mtc_periods
404 /sys/bus/event_source/devices/intel_pt/caps/psb_cyc
417 /sys/bus/event_source/devices/intel_pt/caps/cycle_thresholds
455 /sys/bus/event_source/devices/intel_pt/caps/ptwrite
473 /sys/bus/event_source/devices/intel_pt/caps/power_event_trace
483 /sys/bus/event_source/devices/intel_pt/caps/event_trace
497 /sys/bus/event_source/devices/intel_pt/caps/tnt_disable
[all …]
/tools/perf/arch/x86/util/
Dintel-pt.c488 const char *caps, const char *name, in intel_pt_val_config_term() argument
497 if (perf_pmu__scan_file(intel_pt_pmu, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()

12