Lines Matching refs:ctdp_level

75 			  struct isst_pkg_ctdp_level_info *ctdp_level)  in isst_get_ctdp_control()  argument
87 ctdp_level->fact_support = resp & BIT(0); in isst_get_ctdp_control()
88 ctdp_level->pbf_support = !!(resp & BIT(1)); in isst_get_ctdp_control()
89 ctdp_level->fact_enabled = !!(resp & BIT(16)); in isst_get_ctdp_control()
90 ctdp_level->pbf_enabled = !!(resp & BIT(17)); in isst_get_ctdp_control()
97 ctdp_level->sst_cp_support = cp_cap; in isst_get_ctdp_control()
98 ctdp_level->sst_cp_enabled = cp_state; in isst_get_ctdp_control()
103 id->cpu, resp, ctdp_level->fact_support, ctdp_level->pbf_support, in isst_get_ctdp_control()
104 ctdp_level->fact_enabled, ctdp_level->pbf_enabled); in isst_get_ctdp_control()
110 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_tdp_info() argument
122 ctdp_level->pkg_tdp = resp & GENMASK(14, 0); in isst_get_tdp_info()
123 ctdp_level->tdp_ratio = (resp & GENMASK(23, 16)) >> 16; in isst_get_tdp_info()
127 id->cpu, config_index, resp, ctdp_level->tdp_ratio, in isst_get_tdp_info()
128 ctdp_level->pkg_tdp); in isst_get_tdp_info()
133 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_pwr_info() argument
143 ctdp_level->pkg_max_power = resp & GENMASK(14, 0); in isst_get_pwr_info()
144 ctdp_level->pkg_min_power = (resp & GENMASK(30, 16)) >> 16; in isst_get_pwr_info()
148 id->cpu, config_index, resp, ctdp_level->pkg_max_power, in isst_get_pwr_info()
149 ctdp_level->pkg_min_power); in isst_get_pwr_info()
155 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_uncore_p0_p1_info() argument
163 ctdp_level->uncore_p0 = 0; in isst_get_uncore_p0_p1_info()
164 ctdp_level->uncore_p1 = 0; in isst_get_uncore_p0_p1_info()
168 ctdp_level->uncore_p0 = resp & GENMASK(7, 0); in isst_get_uncore_p0_p1_info()
169 ctdp_level->uncore_p1 = (resp & GENMASK(15, 8)) >> 8; in isst_get_uncore_p0_p1_info()
172 id->cpu, config_index, resp, ctdp_level->uncore_p0, in isst_get_uncore_p0_p1_info()
173 ctdp_level->uncore_p1); in isst_get_uncore_p0_p1_info()
177 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_p1_info() argument
184 ctdp_level->sse_p1 = 0; in isst_get_p1_info()
185 ctdp_level->avx2_p1 = 0; in isst_get_p1_info()
186 ctdp_level->avx512_p1 = 0; in isst_get_p1_info()
190 ctdp_level->sse_p1 = resp & GENMASK(7, 0); in isst_get_p1_info()
191 ctdp_level->avx2_p1 = (resp & GENMASK(15, 8)) >> 8; in isst_get_p1_info()
192 ctdp_level->avx512_p1 = (resp & GENMASK(23, 16)) >> 16; in isst_get_p1_info()
195 id->cpu, config_index, resp, ctdp_level->sse_p1, in isst_get_p1_info()
196 ctdp_level->avx2_p1, ctdp_level->avx512_p1); in isst_get_p1_info()
200 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_uncore_mem_freq() argument
208 ctdp_level->mem_freq = 0; in isst_get_uncore_mem_freq()
212 ctdp_level->mem_freq = resp & GENMASK(7, 0); in isst_get_uncore_mem_freq()
214 ctdp_level->mem_freq *= 200; in isst_get_uncore_mem_freq()
216 if (ctdp_level->mem_freq < 7) { in isst_get_uncore_mem_freq()
217 ctdp_level->mem_freq = (12 - ctdp_level->mem_freq) * 133.33 * 2 * 10; in isst_get_uncore_mem_freq()
218 ctdp_level->mem_freq /= 10; in isst_get_uncore_mem_freq()
219 if (ctdp_level->mem_freq % 10 > 5) in isst_get_uncore_mem_freq()
220 ctdp_level->mem_freq++; in isst_get_uncore_mem_freq()
222 ctdp_level->mem_freq = 0; in isst_get_uncore_mem_freq()
225 ctdp_level->mem_freq = 0; in isst_get_uncore_mem_freq()
229 id->cpu, config_index, resp, ctdp_level->mem_freq); in isst_get_uncore_mem_freq()
233 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_tjmax_info() argument
243 ctdp_level->t_proc_hot = resp & GENMASK(7, 0); in isst_get_tjmax_info()
247 id->cpu, config_index, resp, ctdp_level->t_proc_hot); in isst_get_tjmax_info()
253 struct isst_pkg_ctdp_level_info *ctdp_level) in isst_get_coremask_info() argument
258 ctdp_level->cpu_count = 0; in isst_get_coremask_info()
275 ctdp_level->core_cpumask_size, in isst_get_coremask_info()
276 ctdp_level->core_cpumask, in isst_get_coremask_info()
278 ctdp_level->cpu_count += cpu_count; in isst_get_coremask_info()
280 config_index, i, ctdp_level->cpu_count); in isst_get_coremask_info()
388 struct isst_pkg_ctdp_level_info ctdp_level; in isst_get_pbf_info() local
404 ret = isst_get_ctdp_control(id, level, &ctdp_level); in isst_get_pbf_info()
408 if (!ctdp_level.pbf_support) { in isst_get_pbf_info()
484 struct isst_pkg_ctdp_level_info ctdp_level; in isst_set_pbf_fact_status() local
495 ret = isst_get_ctdp_control(id, current_level, &ctdp_level); in isst_set_pbf_fact_status()
500 if (ctdp_level.fact_enabled) in isst_set_pbf_fact_status()
509 if (enable && !ctdp_level.sst_cp_enabled) in isst_set_pbf_fact_status()
512 if (ctdp_level.pbf_enabled) in isst_set_pbf_fact_status()
599 struct isst_pkg_ctdp_level_info ctdp_level; in isst_get_fact_info() local
615 ret = isst_get_ctdp_control(id, level, &ctdp_level); in isst_get_fact_info()
619 if (!ctdp_level.fact_support) { in isst_get_fact_info()
741 struct isst_pkg_ctdp_level_info *ctdp_level; in isst_get_process_ctdp_complete() local
743 ctdp_level = &pkg_dev->ctdp_level[i]; in isst_get_process_ctdp_complete()
744 if (ctdp_level->pbf_support) in isst_get_process_ctdp_complete()
745 free_cpu_set(ctdp_level->pbf_info.core_cpumask); in isst_get_process_ctdp_complete()
746 free_cpu_set(ctdp_level->core_cpumask); in isst_get_process_ctdp_complete()
774 struct isst_pkg_ctdp_level_info *ctdp_level; in isst_get_process_ctdp() local
781 ctdp_level = &pkg_dev->ctdp_level[i]; in isst_get_process_ctdp()
783 ctdp_level->level = i; in isst_get_process_ctdp()
784 ctdp_level->control_cpu = id->cpu; in isst_get_process_ctdp()
785 ctdp_level->pkg_id = id->pkg; in isst_get_process_ctdp()
786 ctdp_level->die_id = id->die; in isst_get_process_ctdp()
788 ret = isst_get_ctdp_control(id, i, ctdp_level); in isst_get_process_ctdp()
794 ctdp_level->processed = 1; in isst_get_process_ctdp()
796 if (ctdp_level->pbf_support) { in isst_get_process_ctdp()
797 ret = isst_get_pbf_info(id, i, &ctdp_level->pbf_info); in isst_get_process_ctdp()
799 ctdp_level->pbf_found = 1; in isst_get_process_ctdp()
802 if (ctdp_level->fact_support) { in isst_get_process_ctdp()
804 &ctdp_level->fact_info); in isst_get_process_ctdp()
814 ctdp_level->sse_p1 = freq / 100000; in isst_get_process_ctdp()
815 ctdp_level->tdp_ratio = ctdp_level->sse_p1; in isst_get_process_ctdp()
818 isst_get_get_trl_from_msr(id, ctdp_level->trl_sse_active_cores); in isst_get_process_ctdp()
819 isst_get_trl_bucket_info(id, &ctdp_level->buckets_info); in isst_get_process_ctdp()
823 ret = isst_get_tdp_info(id, i, ctdp_level); in isst_get_process_ctdp()
827 ret = isst_get_pwr_info(id, i, ctdp_level); in isst_get_process_ctdp()
831 ret = isst_get_tjmax_info(id, i, ctdp_level); in isst_get_process_ctdp()
835 ctdp_level->core_cpumask_size = in isst_get_process_ctdp()
836 alloc_cpu_set(&ctdp_level->core_cpumask); in isst_get_process_ctdp()
837 ret = isst_get_coremask_info(id, i, ctdp_level); in isst_get_process_ctdp()
841 ret = isst_get_trl_bucket_info(id, &ctdp_level->buckets_info); in isst_get_process_ctdp()
846 ctdp_level->trl_sse_active_cores); in isst_get_process_ctdp()
851 ctdp_level->trl_avx_active_cores); in isst_get_process_ctdp()
856 ctdp_level->trl_avx_512_active_cores); in isst_get_process_ctdp()
860 isst_get_uncore_p0_p1_info(id, i, ctdp_level); in isst_get_process_ctdp()
861 isst_get_p1_info(id, i, ctdp_level); in isst_get_process_ctdp()
862 isst_get_uncore_mem_freq(id, i, ctdp_level); in isst_get_process_ctdp()
903 struct isst_pkg_ctdp_level_info ctdp_level; in isst_pm_qos_config() local
912 &ctdp_level); in isst_pm_qos_config()
916 if (ctdp_level.fact_enabled) { in isst_pm_qos_config()