Lines Matching full:info

10 int tpmi_process_ioctl(int ioctl_no, void *info)  in tpmi_process_ioctl()  argument
64 if (ioctl(fd, ioctl_no, info) == -1) { in tpmi_process_ioctl()
117 struct isst_tpmi_instance_count info; in tpmi_is_punit_valid() local
123 info.socket_id = id->pkg; in tpmi_is_punit_valid()
124 ret = tpmi_process_ioctl(ISST_IF_COUNT_TPMI_INSTANCES, &info); in tpmi_is_punit_valid()
128 if (info.valid_mask & BIT(id->punit)) in tpmi_is_punit_valid()
136 struct isst_core_power info; in tpmi_read_pm_config() local
139 info.get_set = 0; in tpmi_read_pm_config()
140 info.socket_id = id->pkg; in tpmi_read_pm_config()
141 info.power_domain_id = id->punit; in tpmi_read_pm_config()
142 ret = tpmi_process_ioctl(ISST_IF_CORE_POWER_STATE, &info); in tpmi_read_pm_config()
146 *cp_state = info.enable; in tpmi_read_pm_config()
147 *cp_cap = info.supported; in tpmi_read_pm_config()
154 struct isst_perf_level_info info; in tpmi_get_config_levels() local
157 info.socket_id = id->pkg; in tpmi_get_config_levels()
158 info.power_domain_id = id->punit; in tpmi_get_config_levels()
160 ret = tpmi_process_ioctl(ISST_IF_PERF_LEVELS, &info); in tpmi_get_config_levels()
164 pkg_dev->version = info.feature_rev; in tpmi_get_config_levels()
165 pkg_dev->levels = info.max_level; in tpmi_get_config_levels()
166 pkg_dev->locked = info.locked; in tpmi_get_config_levels()
167 pkg_dev->current_level = info.current_level; in tpmi_get_config_levels()
168 pkg_dev->locked = info.locked; in tpmi_get_config_levels()
169 pkg_dev->enabled = info.enabled; in tpmi_get_config_levels()
178 struct isst_perf_level_info info; in tpmi_get_ctdp_control() local
182 info.socket_id = id->pkg; in tpmi_get_ctdp_control()
183 info.power_domain_id = id->punit; in tpmi_get_ctdp_control()
185 ret = tpmi_process_ioctl(ISST_IF_PERF_LEVELS, &info); in tpmi_get_ctdp_control()
194 if (!(info.level_mask & level_mask)) in tpmi_get_ctdp_control()
197 ctdp_level->fact_support = info.sst_tf_support; in tpmi_get_ctdp_control()
198 ctdp_level->pbf_support = info.sst_bf_support; in tpmi_get_ctdp_control()
199 ctdp_level->fact_enabled = !!(info.feature_state & BIT(1)); in tpmi_get_ctdp_control()
200 ctdp_level->pbf_enabled = !!(info.feature_state & BIT(0)); in tpmi_get_ctdp_control()
224 struct isst_perf_level_data_info info; in tpmi_get_tdp_info() local
227 info.socket_id = id->pkg; in tpmi_get_tdp_info()
228 info.power_domain_id = id->punit; in tpmi_get_tdp_info()
229 info.level = config_index; in tpmi_get_tdp_info()
231 ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_INFO, &info); in tpmi_get_tdp_info()
235 ctdp_level->pkg_tdp = info.thermal_design_power_w; in tpmi_get_tdp_info()
236 ctdp_level->tdp_ratio = info.tdp_ratio; in tpmi_get_tdp_info()
237 ctdp_level->sse_p1 = info.base_freq_mhz; in tpmi_get_tdp_info()
238 ctdp_level->avx2_p1 = info.base_freq_avx2_mhz; in tpmi_get_tdp_info()
239 ctdp_level->avx512_p1 = info.base_freq_avx512_mhz; in tpmi_get_tdp_info()
240 ctdp_level->amx_p1 = info.base_freq_amx_mhz; in tpmi_get_tdp_info()
242 ctdp_level->t_proc_hot = info.tjunction_max_c; in tpmi_get_tdp_info()
243 ctdp_level->mem_freq = info.max_memory_freq_mhz; in tpmi_get_tdp_info()
244 ctdp_level->cooling_type = info.cooling_type; in tpmi_get_tdp_info()
246 ctdp_level->uncore_p0 = info.p0_fabric_freq_mhz; in tpmi_get_tdp_info()
247 ctdp_level->uncore_p1 = info.p1_fabric_freq_mhz; in tpmi_get_tdp_info()
248 ctdp_level->uncore_pm = info.pm_fabric_freq_mhz; in tpmi_get_tdp_info()
276 struct isst_perf_level_cpu_mask info; in tpmi_get_coremask_info() local
279 info.socket_id = id->pkg; in tpmi_get_coremask_info()
280 info.power_domain_id = id->punit; in tpmi_get_coremask_info()
281 info.level = config_index; in tpmi_get_coremask_info()
282 info.punit_cpu_map = 1; in tpmi_get_coremask_info()
284 ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_CPU_MASK, &info); in tpmi_get_coremask_info()
288 set_cpu_mask_from_punit_coremask(id, info.mask, in tpmi_get_coremask_info()
302 struct isst_perf_level_data_info info; in tpmi_get_get_trls() local
305 info.socket_id = id->pkg; in tpmi_get_get_trls()
306 info.power_domain_id = id->punit; in tpmi_get_get_trls()
307 info.level = config_index; in tpmi_get_get_trls()
309 ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_INFO, &info); in tpmi_get_get_trls()
313 if (info.max_buckets > TRL_MAX_BUCKETS) in tpmi_get_get_trls()
314 info.max_buckets = TRL_MAX_BUCKETS; in tpmi_get_get_trls()
316 if (info.max_trl_levels > TRL_MAX_LEVELS) in tpmi_get_get_trls()
317 info.max_trl_levels = TRL_MAX_LEVELS; in tpmi_get_get_trls()
319 for (i = 0; i < info.max_trl_levels; ++i) in tpmi_get_get_trls()
320 for (j = 0; j < info.max_buckets; ++j) in tpmi_get_get_trls()
321 ctdp_level->trl_ratios[i][j] = info.trl_freq_mhz[i][j]; in tpmi_get_get_trls()
346 struct isst_perf_level_data_info info; in tpmi_get_trl_bucket_info() local
350 info.socket_id = id->pkg; in tpmi_get_trl_bucket_info()
351 info.power_domain_id = id->punit; in tpmi_get_trl_bucket_info()
352 info.level = config_index; in tpmi_get_trl_bucket_info()
354 ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_INFO, &info); in tpmi_get_trl_bucket_info()
358 if (info.max_buckets > TRL_MAX_BUCKETS) in tpmi_get_trl_bucket_info()
359 info.max_buckets = TRL_MAX_BUCKETS; in tpmi_get_trl_bucket_info()
361 for (i = 0; i < info.max_buckets; ++i) in tpmi_get_trl_bucket_info()
362 mask[i] = info.bucket_core_counts[i]; in tpmi_get_trl_bucket_info()
364 debug_printf("cpu:%d TRL bucket info: 0x%llx\n", id->cpu, in tpmi_get_trl_bucket_info()
372 struct isst_perf_level_control info; in tpmi_set_tdp_level() local
375 info.socket_id = id->pkg; in tpmi_set_tdp_level()
376 info.power_domain_id = id->punit; in tpmi_set_tdp_level()
377 info.level = tdp_level; in tpmi_set_tdp_level()
379 ret = tpmi_process_ioctl(ISST_IF_PERF_SET_LEVEL, &info); in tpmi_set_tdp_level()
389 struct isst_perf_level_cpu_mask info; in _pbf_get_coremask_info() local
392 info.socket_id = id->pkg; in _pbf_get_coremask_info()
393 info.power_domain_id = id->punit; in _pbf_get_coremask_info()
394 info.level = config_index; in _pbf_get_coremask_info()
395 info.punit_cpu_map = 1; in _pbf_get_coremask_info()
397 ret = tpmi_process_ioctl(ISST_IF_GET_BASE_FREQ_CPU_MASK, &info); in _pbf_get_coremask_info()
401 set_cpu_mask_from_punit_coremask(id, info.mask, in _pbf_get_coremask_info()
405 debug_printf("cpu:%d ctdp:%d pbf core_mask info cpu count:%d\n", in _pbf_get_coremask_info()
414 struct isst_base_freq_info info; in tpmi_get_pbf_info() local
417 info.socket_id = id->pkg; in tpmi_get_pbf_info()
418 info.power_domain_id = id->punit; in tpmi_get_pbf_info()
419 info.level = level; in tpmi_get_pbf_info()
421 ret = tpmi_process_ioctl(ISST_IF_GET_BASE_FREQ_INFO, &info); in tpmi_get_pbf_info()
425 pbf_info->p1_low = info.low_base_freq_mhz; in tpmi_get_pbf_info()
426 pbf_info->p1_high = info.high_base_freq_mhz; in tpmi_get_pbf_info()
427 pbf_info->tdp = info.thermal_design_power_w; in tpmi_get_pbf_info()
428 pbf_info->t_prochot = info.tjunction_max_c; in tpmi_get_pbf_info()
430 debug_printf("cpu:%d ctdp:%d pbf info:%d:%d:%d:%d\n", in tpmi_get_pbf_info()
442 struct isst_perf_feature_control info; in tpmi_set_pbf_fact_status() local
455 info.socket_id = id->pkg; in tpmi_set_pbf_fact_status()
456 info.power_domain_id = id->punit; in tpmi_set_pbf_fact_status()
458 info.feature = 0; in tpmi_set_pbf_fact_status()
462 info.feature |= BIT(1); in tpmi_set_pbf_fact_status()
465 info.feature |= BIT(0); in tpmi_set_pbf_fact_status()
467 info.feature &= ~BIT(0); in tpmi_set_pbf_fact_status()
476 info.feature |= BIT(0); in tpmi_set_pbf_fact_status()
479 info.feature |= BIT(1); in tpmi_set_pbf_fact_status()
481 info.feature &= ~BIT(1); in tpmi_set_pbf_fact_status()
484 ret = tpmi_process_ioctl(ISST_IF_PERF_SET_FEATURE, &info); in tpmi_set_pbf_fact_status()
494 struct isst_turbo_freq_info info; in tpmi_get_fact_info() local
498 info.socket_id = id->pkg; in tpmi_get_fact_info()
499 info.power_domain_id = id->punit; in tpmi_get_fact_info()
500 info.level = level; in tpmi_get_fact_info()
502 ret = tpmi_process_ioctl(ISST_IF_GET_TURBO_FREQ_INFO, &info); in tpmi_get_fact_info()
506 for (i = 0; i < info.max_clip_freqs; ++i) in tpmi_get_fact_info()
507 fact_info->lp_ratios[i] = info.lp_clip_freq_mhz[i]; in tpmi_get_fact_info()
509 if (info.max_buckets > TRL_MAX_BUCKETS) in tpmi_get_fact_info()
510 info.max_buckets = TRL_MAX_BUCKETS; in tpmi_get_fact_info()
512 if (info.max_trl_levels > TRL_MAX_LEVELS) in tpmi_get_fact_info()
513 info.max_trl_levels = TRL_MAX_LEVELS; in tpmi_get_fact_info()
515 for (i = 0; i < info.max_trl_levels; ++i) { in tpmi_get_fact_info()
516 for (j = 0; j < info.max_buckets; ++j) in tpmi_get_fact_info()
518 info.trl_freq_mhz[i][j]; in tpmi_get_fact_info()
521 for (i = 0; i < info.max_buckets; ++i) in tpmi_get_fact_info()
522 fact_info->bucket_info[i].hp_cores = info.bucket_core_counts[i]; in tpmi_get_fact_info()
598 struct isst_perf_level_data_info info; in tpmi_adjust_uncore_freq() local
601 info.socket_id = id->pkg; in tpmi_adjust_uncore_freq()
602 info.power_domain_id = id->punit; in tpmi_adjust_uncore_freq()
603 info.level = config_index; in tpmi_adjust_uncore_freq()
605 ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_INFO, &info); in tpmi_adjust_uncore_freq()
609 ctdp_level->uncore_p0 = info.p0_fabric_freq_mhz; in tpmi_adjust_uncore_freq()
610 ctdp_level->uncore_p1 = info.p1_fabric_freq_mhz; in tpmi_adjust_uncore_freq()
611 ctdp_level->uncore_pm = info.pm_fabric_freq_mhz; in tpmi_adjust_uncore_freq()
624 struct isst_core_power info; in tpmi_get_clos_information() local
627 info.get_set = 0; in tpmi_get_clos_information()
628 info.socket_id = id->pkg; in tpmi_get_clos_information()
629 info.power_domain_id = id->punit; in tpmi_get_clos_information()
630 ret = tpmi_process_ioctl(ISST_IF_CORE_POWER_STATE, &info); in tpmi_get_clos_information()
634 *enable = info.enable; in tpmi_get_clos_information()
635 *type = info.priority_type; in tpmi_get_clos_information()
643 struct isst_core_power info; in tpmi_pm_qos_config() local
646 info.get_set = 1; in tpmi_pm_qos_config()
647 info.socket_id = id->pkg; in tpmi_pm_qos_config()
648 info.power_domain_id = id->punit; in tpmi_pm_qos_config()
649 info.enable = enable_clos; in tpmi_pm_qos_config()
650 info.priority_type = priority_type; in tpmi_pm_qos_config()
658 info.power_domain_id = i; in tpmi_pm_qos_config()
659 ret = tpmi_process_ioctl(ISST_IF_CORE_POWER_STATE, &info); in tpmi_pm_qos_config()
675 struct isst_clos_param info; in tpmi_pm_get_clos() local
678 info.get_set = 0; in tpmi_pm_get_clos()
679 info.socket_id = id->pkg; in tpmi_pm_get_clos()
680 info.power_domain_id = id->punit; in tpmi_pm_get_clos()
681 info.clos = clos; in tpmi_pm_get_clos()
683 ret = tpmi_process_ioctl(ISST_IF_CLOS_PARAM, &info); in tpmi_pm_get_clos()
688 clos_config->clos_prop_prio = info.prop_prio; in tpmi_pm_get_clos()
689 clos_config->clos_min = info.min_freq_mhz; in tpmi_pm_get_clos()
690 clos_config->clos_max = info.max_freq_mhz; in tpmi_pm_get_clos()
702 struct isst_clos_param info; in tpmi_set_clos() local
705 info.get_set = 1; in tpmi_set_clos()
706 info.socket_id = id->pkg; in tpmi_set_clos()
707 info.power_domain_id = id->punit; in tpmi_set_clos()
708 info.clos = clos; in tpmi_set_clos()
709 info.prop_prio = clos_config->clos_prop_prio; in tpmi_set_clos()
711 info.min_freq_mhz = clos_config->clos_min; in tpmi_set_clos()
712 info.max_freq_mhz = clos_config->clos_max; in tpmi_set_clos()
714 if (info.min_freq_mhz <= 0xff) in tpmi_set_clos()
715 info.min_freq_mhz *= 100; in tpmi_set_clos()
716 if (info.max_freq_mhz <= 0xff) in tpmi_set_clos()
717 info.max_freq_mhz *= 100; in tpmi_set_clos()
725 info.power_domain_id = i; in tpmi_set_clos()
726 ret = tpmi_process_ioctl(ISST_IF_CLOS_PARAM, &info); in tpmi_set_clos()