Lines Matching refs:pstate

239 	struct pstate_data pstate;  member
290 u64 (*get_val)(struct cpudata*, int pstate);
486 cpu->pstate.max_pstate == cpu->pstate.turbo_pstate); in update_turbo_state()
492 int turbo_pstate = cpu->pstate.turbo_pstate; in min_perf_pct_min()
495 (cpu->pstate.min_pstate * 100 / turbo_pstate) : 0; in min_perf_pct_min()
885 total = cpu->pstate.turbo_pstate - cpu->pstate.min_pstate + 1; in show_turbo_pct()
886 no_turbo = cpu->pstate.max_pstate - cpu->pstate.min_pstate + 1; in show_turbo_pct()
909 total = cpu->pstate.turbo_pstate - cpu->pstate.min_pstate + 1; in show_num_pstates()
970 int pct = cpu->pstate.max_pstate * 100 / cpu->pstate.turbo_pstate; in store_no_turbo()
1184 static u64 atom_get_val(struct cpudata *cpudata, int pstate) in atom_get_val() argument
1190 val = (u64)pstate << 8; in atom_get_val()
1195 int_tofp(pstate - cpudata->pstate.min_pstate), in atom_get_val()
1201 if (pstate > cpudata->pstate.max_pstate) in atom_get_val()
1247 int_tofp(cpudata->pstate.max_pstate - in atom_get_vid()
1248 cpudata->pstate.min_pstate)); in atom_get_vid()
1356 static u64 core_get_val(struct cpudata *cpudata, int pstate) in core_get_val() argument
1360 val = (u64)pstate << 8; in core_get_val()
1388 cpu->pstate.max_pstate : cpu->pstate.turbo_pstate; in intel_pstate_get_base_pstate()
1391 static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) in intel_pstate_set_pstate() argument
1393 trace_cpu_frequency(pstate * cpu->pstate.scaling, cpu->cpu); in intel_pstate_set_pstate()
1394 cpu->pstate.current_pstate = pstate; in intel_pstate_set_pstate()
1401 pstate_funcs.get_val(cpu, pstate)); in intel_pstate_set_pstate()
1406 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); in intel_pstate_set_min_pstate()
1411 int pstate; in intel_pstate_max_within_limits() local
1414 pstate = intel_pstate_get_base_pstate(cpu); in intel_pstate_max_within_limits()
1415 pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); in intel_pstate_max_within_limits()
1416 intel_pstate_set_pstate(cpu, pstate); in intel_pstate_max_within_limits()
1421 cpu->pstate.min_pstate = pstate_funcs.get_min(); in intel_pstate_get_cpu_pstates()
1422 cpu->pstate.max_pstate = pstate_funcs.get_max(); in intel_pstate_get_cpu_pstates()
1423 cpu->pstate.max_pstate_physical = pstate_funcs.get_max_physical(); in intel_pstate_get_cpu_pstates()
1424 cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(); in intel_pstate_get_cpu_pstates()
1425 cpu->pstate.scaling = pstate_funcs.get_scaling(); in intel_pstate_get_cpu_pstates()
1426 cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling; in intel_pstate_get_cpu_pstates()
1432 cpu->pstate.turbo_freq = phy_max * cpu->pstate.scaling; in intel_pstate_get_cpu_pstates()
1434 cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling; in intel_pstate_get_cpu_pstates()
1612 return mul_ext_fp(cpu->pstate.max_pstate_physical, in get_avg_pstate()
1634 cpu->pstate.max_pstate : cpu->pstate.turbo_pstate; in get_target_pstate()
1637 if (target < cpu->pstate.min_pstate) in get_target_pstate()
1638 target = cpu->pstate.min_pstate; in get_target_pstate()
1654 static int intel_pstate_prepare_request(struct cpudata *cpu, int pstate) in intel_pstate_prepare_request() argument
1659 min_pstate = max(cpu->pstate.min_pstate, cpu->min_perf_ratio); in intel_pstate_prepare_request()
1661 return clamp_t(int, pstate, min_pstate, max_pstate); in intel_pstate_prepare_request()
1664 static void intel_pstate_update_pstate(struct cpudata *cpu, int pstate) in intel_pstate_update_pstate() argument
1666 if (pstate == cpu->pstate.current_pstate) in intel_pstate_update_pstate()
1669 cpu->pstate.current_pstate = pstate; in intel_pstate_update_pstate()
1670 wrmsrl(MSR_IA32_PERF_CTL, pstate_funcs.get_val(cpu, pstate)); in intel_pstate_update_pstate()
1675 int from = cpu->pstate.current_pstate; in intel_pstate_adjust_pstate()
1683 trace_cpu_frequency(target_pstate * cpu->pstate.scaling, cpu->cpu); in intel_pstate_adjust_pstate()
1690 cpu->pstate.current_pstate, in intel_pstate_adjust_pstate()
1899 cpu->pstate.max_freq : cpu->pstate.turbo_freq; in intel_pstate_get_max_freq()
1918 turbo_max = cpu->pstate.turbo_pstate; in intel_pstate_update_perf_limits()
2012 cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate && in intel_pstate_adjust_policy_max()
2014 policy->max > cpu->pstate.max_freq) { in intel_pstate_adjust_policy_max()
2076 policy->min = cpu->pstate.min_pstate * cpu->pstate.scaling; in __intel_pstate_cpu_init()
2077 policy->max = cpu->pstate.turbo_pstate * cpu->pstate.scaling; in __intel_pstate_cpu_init()
2080 policy->cpuinfo.min_freq = cpu->pstate.min_pstate * cpu->pstate.scaling; in __intel_pstate_cpu_init()
2083 cpu->pstate.max_pstate : cpu->pstate.turbo_pstate; in __intel_pstate_cpu_init()
2084 policy->cpuinfo.max_freq *= cpu->pstate.scaling; in __intel_pstate_cpu_init()
2090 cpu->pstate.max_freq : cpu->pstate.turbo_freq; in __intel_pstate_cpu_init()
2174 cpu->pstate.current_pstate, in intel_cpufreq_trace()
2198 target_pstate = DIV_ROUND_UP(freqs.new, cpu->pstate.scaling); in intel_cpufreq_target()
2201 target_pstate = freqs.new / cpu->pstate.scaling; in intel_cpufreq_target()
2204 target_pstate = DIV_ROUND_CLOSEST(freqs.new, cpu->pstate.scaling); in intel_cpufreq_target()
2208 old_pstate = cpu->pstate.current_pstate; in intel_cpufreq_target()
2209 if (target_pstate != cpu->pstate.current_pstate) { in intel_cpufreq_target()
2210 cpu->pstate.current_pstate = target_pstate; in intel_cpufreq_target()
2214 freqs.new = target_pstate * cpu->pstate.scaling; in intel_cpufreq_target()
2229 target_pstate = DIV_ROUND_UP(target_freq, cpu->pstate.scaling); in intel_cpufreq_fast_switch()
2231 old_pstate = cpu->pstate.current_pstate; in intel_cpufreq_fast_switch()
2234 return target_pstate * cpu->pstate.scaling; in intel_cpufreq_fast_switch()