Lines Matching +full:fast +full:- +full:dvfs
1 // SPDX-License-Identifier: GPL-2.0-only
38 #include <asm/intel-family.h>
56 #define ONE_EIGHTH_FP ((int64_t)1 << (FRAC_BITS - 3))
78 mask = (1 << FRAC_BITS) - 1; in ceiling_fp()
95 * struct sample - Store performance sample
122 * struct pstate_data - Store P state data
129 * @perf_ctl_scaling: PERF_CTL P-state to frequency scaling factor
152 * struct vid_data - Stores voltage information data
157 * @ratio: Ratio of (vid max - vid min) /
158 * (max P state - Min P State)
160 * Stores the voltage data for DVFS (Dynamic Voltage and Frequency Scaling)
172 * struct global_params - Global parameters, mostly tunable via sysfs.
173 * @no_turbo: Whether or not to use turbo P-states.
174 * @turbo_disabled: Whether or not turbo P-states are available at all,
176 * not the maximum reported turbo P-state is different from
177 * the maximum reported non-turbo one.
179 * P-state capacity.
181 * P-state capacity.
191 * struct cpudata - Per CPU instance data storage
196 * @iowait_boost: iowait-related boost fraction
216 * @epp_cached: Cached HWP energy-performance preference value
273 * struct pstate_funcs - Per CPU model specific callbacks
377 cppc_perf.highest_perf = HWP_HIGHEST_PERF(READ_ONCE(all_cpu_data[cpu]->hwp_cap_cached)); in intel_pstate_set_itmt_prio()
425 * Compute the perf-to-frequency scaling factor for the given CPU if in intel_pstate_cppc_get_scaling()
449 intel_pstate_set_itmt_prio(policy->cpu); in intel_pstate_init_acpi_perf_limits()
456 cpu = all_cpu_data[policy->cpu]; in intel_pstate_init_acpi_perf_limits()
458 ret = acpi_processor_register_performance(&cpu->acpi_perf_data, in intel_pstate_init_acpi_perf_limits()
459 policy->cpu); in intel_pstate_init_acpi_perf_limits()
468 if (cpu->acpi_perf_data.control_register.space_id != in intel_pstate_init_acpi_perf_limits()
476 if (cpu->acpi_perf_data.state_count < 2) in intel_pstate_init_acpi_perf_limits()
479 pr_debug("CPU%u - ACPI _PSS perf data\n", policy->cpu); in intel_pstate_init_acpi_perf_limits()
480 for (i = 0; i < cpu->acpi_perf_data.state_count; i++) { in intel_pstate_init_acpi_perf_limits()
482 (i == cpu->acpi_perf_data.state ? '*' : ' '), i, in intel_pstate_init_acpi_perf_limits()
483 (u32) cpu->acpi_perf_data.states[i].core_frequency, in intel_pstate_init_acpi_perf_limits()
484 (u32) cpu->acpi_perf_data.states[i].power, in intel_pstate_init_acpi_perf_limits()
485 (u32) cpu->acpi_perf_data.states[i].control); in intel_pstate_init_acpi_perf_limits()
488 cpu->valid_pss_table = true; in intel_pstate_init_acpi_perf_limits()
494 cpu->valid_pss_table = false; in intel_pstate_init_acpi_perf_limits()
495 acpi_processor_unregister_performance(policy->cpu); in intel_pstate_init_acpi_perf_limits()
502 cpu = all_cpu_data[policy->cpu]; in intel_pstate_exit_perf_limits()
503 if (!cpu->valid_pss_table) in intel_pstate_exit_perf_limits()
506 acpi_processor_unregister_performance(policy->cpu); in intel_pstate_exit_perf_limits()
526 return -ENOTSUPP; in intel_pstate_get_cppc_guaranteed()
538 if (freq == cpu->pstate.turbo_freq) in intel_pstate_freq_to_hwp_rel()
539 return cpu->pstate.turbo_pstate; in intel_pstate_freq_to_hwp_rel()
541 if (freq == cpu->pstate.max_freq) in intel_pstate_freq_to_hwp_rel()
542 return cpu->pstate.max_pstate; in intel_pstate_freq_to_hwp_rel()
546 return freq / cpu->pstate.scaling; in intel_pstate_freq_to_hwp_rel()
548 return DIV_ROUND_CLOSEST(freq, cpu->pstate.scaling); in intel_pstate_freq_to_hwp_rel()
551 return DIV_ROUND_UP(freq, cpu->pstate.scaling); in intel_pstate_freq_to_hwp_rel()
560 * intel_pstate_hybrid_hwp_adjust - Calibrate HWP performance levels.
564 * P-states accessible through the PERF_CTL interface. If that happens, the
566 * than the scaling factor between P-state values and CPU frequency.
572 int perf_ctl_max_phys = cpu->pstate.max_pstate_physical; in intel_pstate_hybrid_hwp_adjust()
573 int perf_ctl_scaling = cpu->pstate.perf_ctl_scaling; in intel_pstate_hybrid_hwp_adjust()
574 int perf_ctl_turbo = pstate_funcs.get_turbo(cpu->cpu); in intel_pstate_hybrid_hwp_adjust()
575 int scaling = cpu->pstate.scaling; in intel_pstate_hybrid_hwp_adjust()
578 pr_debug("CPU%d: PERF_CTL max_phys = %d\n", cpu->cpu, perf_ctl_max_phys); in intel_pstate_hybrid_hwp_adjust()
579 pr_debug("CPU%d: PERF_CTL turbo = %d\n", cpu->cpu, perf_ctl_turbo); in intel_pstate_hybrid_hwp_adjust()
580 pr_debug("CPU%d: PERF_CTL scaling = %d\n", cpu->cpu, perf_ctl_scaling); in intel_pstate_hybrid_hwp_adjust()
581 pr_debug("CPU%d: HWP_CAP guaranteed = %d\n", cpu->cpu, cpu->pstate.max_pstate); in intel_pstate_hybrid_hwp_adjust()
582 pr_debug("CPU%d: HWP_CAP highest = %d\n", cpu->cpu, cpu->pstate.turbo_pstate); in intel_pstate_hybrid_hwp_adjust()
583 pr_debug("CPU%d: HWP-to-frequency scaling factor: %d\n", cpu->cpu, scaling); in intel_pstate_hybrid_hwp_adjust()
590 cpu->pstate.turbo_freq = rounddown(cpu->pstate.turbo_pstate * scaling, in intel_pstate_hybrid_hwp_adjust()
592 cpu->pstate.max_freq = rounddown(cpu->pstate.max_pstate * scaling, in intel_pstate_hybrid_hwp_adjust()
596 cpu->pstate.max_pstate_physical = intel_pstate_freq_to_hwp(cpu, freq); in intel_pstate_hybrid_hwp_adjust()
598 freq = cpu->pstate.min_pstate * perf_ctl_scaling; in intel_pstate_hybrid_hwp_adjust()
599 cpu->pstate.min_freq = freq; in intel_pstate_hybrid_hwp_adjust()
601 * Cast the min P-state value retrieved via pstate_funcs.get_min() to in intel_pstate_hybrid_hwp_adjust()
604 cpu->pstate.min_pstate = intel_pstate_freq_to_hwp(cpu, freq); in intel_pstate_hybrid_hwp_adjust()
619 int turbo_pstate = cpu->pstate.turbo_pstate; in min_perf_pct_min()
622 (cpu->pstate.min_pstate * 100 / turbo_pstate) : 0; in min_perf_pct_min()
627 s16 epp = -EOPNOTSUPP; in intel_pstate_get_epp()
635 epp = rdmsrq_on_cpu(cpu_data->cpu, MSR_HWP_REQUEST, in intel_pstate_get_epp()
650 *-------------------------------------
685 int index = -EINVAL; in intel_pstate_get_energy_pref_index()
706 * 0x00-0x03 : Performance in intel_pstate_get_energy_pref_index()
707 * 0x04-0x07 : Balance performance in intel_pstate_get_energy_pref_index()
708 * 0x08-0x0B : Balance power in intel_pstate_get_energy_pref_index()
709 * 0x0C-0x0F : Power in intel_pstate_get_energy_pref_index()
729 u64 value = READ_ONCE(cpu->hwp_req_cached); in intel_pstate_set_epp()
738 WRITE_ONCE(cpu->hwp_req_cached, value); in intel_pstate_set_epp()
739 ret = wrmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, value); in intel_pstate_set_epp()
741 cpu->epp_cached = epp; in intel_pstate_set_epp()
750 int epp = -EINVAL; in intel_pstate_set_energy_pref_index()
751 int ret = -EOPNOTSUPP; in intel_pstate_set_energy_pref_index()
754 epp = cpu_data->epp_default; in intel_pstate_set_energy_pref_index()
759 else if (epp == -EINVAL) in intel_pstate_set_energy_pref_index()
767 if (epp > 0 && cpu_data->policy == CPUFREQ_POLICY_PERFORMANCE) in intel_pstate_set_energy_pref_index()
768 return -EBUSY; in intel_pstate_set_energy_pref_index()
797 struct cpudata *cpu = all_cpu_data[policy->cpu]; in store_energy_performance_preference()
805 return -EINVAL; in store_energy_performance_preference()
807 ret = match_string(energy_perf_strings, -1, str_preference); in store_energy_performance_preference()
817 return -EINVAL; in store_energy_performance_preference()
828 return -EAGAIN; in store_energy_performance_preference()
838 * which is super-heavy-weight, so make sure it is worth doing in store_energy_performance_preference()
842 epp = ret ? epp_values[ret] : cpu->epp_default; in store_energy_performance_preference()
844 if (cpu->epp_cached != epp) { in store_energy_performance_preference()
865 struct cpudata *cpu_data = all_cpu_data[policy->cpu]; in show_energy_performance_preference()
882 struct cpudata *cpu = all_cpu_data[policy->cpu]; in show_base_frequency()
885 ratio = intel_pstate_get_cppc_guaranteed(policy->cpu); in show_base_frequency()
889 rdmsrq_on_cpu(policy->cpu, MSR_HWP_CAPABILITIES, &cap); in show_base_frequency()
893 freq = ratio * cpu->pstate.scaling; in show_base_frequency()
894 if (cpu->pstate.scaling != cpu->pstate.perf_ctl_scaling) in show_base_frequency()
895 freq = rounddown(freq, cpu->pstate.perf_ctl_scaling); in show_base_frequency()
927 * and the x86 arch scale-invariance information from concurrent updates.
961 for (i = 0; i < cacheinfo->num_leaves; i++) { in hybrid_has_l3()
962 if (cacheinfo->info_list[i].level == 3) in hybrid_has_l3()
977 * The idea is to start loading up LPE-cores before E-cores and start in hybrid_get_cost()
978 * to populate E-cores when LPE-cores are utilized above 60% of the in hybrid_get_cost()
979 * capacity. Similarly, P-cores start to be populated when E-cores are in hybrid_get_cost()
982 if (hybrid_get_cpu_type(dev->id) == INTEL_CPU_TYPE_ATOM) { in hybrid_get_cost()
983 if (hybrid_has_l3(dev->id)) /* E-core */ in hybrid_get_cost()
985 } else { /* P-core */ in hybrid_get_cost()
1004 if (!hybrid_max_perf_cpu || cpudata->pd_registered) in hybrid_register_perf_domain()
1015 cpudata->pd_registered = true; in hybrid_register_perf_domain()
1030 if (cpu->pd_registered) in hybrid_update_perf_domain()
1031 em_adjust_cpu_capacity(cpu->cpu); in hybrid_update_perf_domain()
1041 arch_set_cpu_capacity(cpu->cpu, cpu->capacity_perf, in hybrid_set_cpu_capacity()
1042 hybrid_max_perf_cpu->capacity_perf, in hybrid_set_cpu_capacity()
1043 cpu->capacity_perf, in hybrid_set_cpu_capacity()
1044 cpu->pstate.max_pstate_physical); in hybrid_set_cpu_capacity()
1047 topology_set_cpu_scale(cpu->cpu, arch_scale_cpu_capacity(cpu->cpu)); in hybrid_set_cpu_capacity()
1050 cpu->cpu, cpu->capacity_perf, cpu->pstate.max_pstate_physical, in hybrid_set_cpu_capacity()
1051 hybrid_max_perf_cpu->capacity_perf); in hybrid_set_cpu_capacity()
1062 cpu->capacity_perf = cpu->pstate.max_pstate_physical; in hybrid_get_capacity_perf()
1066 cpu->capacity_perf = HWP_HIGHEST_PERF(READ_ONCE(cpu->hwp_cap_cached)); in hybrid_get_capacity_perf()
1108 if (cpu->capacity_perf > max_cap_perf) { in hybrid_update_cpu_capacity_scaling()
1109 max_cap_perf = cpu->capacity_perf; in hybrid_update_cpu_capacity_scaling()
1145 /* Bail out if enabling capacity-aware scheduling is prohibited. */ in hybrid_init_cpu_capacity_scaling()
1190 rdmsrq_on_cpu(cpu->cpu, MSR_HWP_CAPABILITIES, &cap); in __intel_pstate_get_hwp_cap()
1191 WRITE_ONCE(cpu->hwp_cap_cached, cap); in __intel_pstate_get_hwp_cap()
1192 cpu->pstate.max_pstate = HWP_GUARANTEED_PERF(cap); in __intel_pstate_get_hwp_cap()
1193 cpu->pstate.turbo_pstate = HWP_HIGHEST_PERF(cap); in __intel_pstate_get_hwp_cap()
1198 int scaling = cpu->pstate.scaling; in intel_pstate_get_hwp_cap()
1202 cpu->pstate.max_freq = cpu->pstate.max_pstate * scaling; in intel_pstate_get_hwp_cap()
1203 cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * scaling; in intel_pstate_get_hwp_cap()
1204 if (scaling != cpu->pstate.perf_ctl_scaling) { in intel_pstate_get_hwp_cap()
1205 int perf_ctl_scaling = cpu->pstate.perf_ctl_scaling; in intel_pstate_get_hwp_cap()
1207 cpu->pstate.max_freq = rounddown(cpu->pstate.max_freq, in intel_pstate_get_hwp_cap()
1209 cpu->pstate.turbo_freq = rounddown(cpu->pstate.turbo_freq, in intel_pstate_get_hwp_cap()
1227 max_cap_perf = hybrid_max_perf_cpu->capacity_perf; in hybrid_update_capacity()
1233 if (cpu->capacity_perf > max_cap_perf) { in hybrid_update_capacity()
1240 if (cpu == hybrid_max_perf_cpu && cpu->capacity_perf < max_cap_perf) { in hybrid_update_capacity()
1252 if (hybrid_register_perf_domain(cpu->cpu)) in hybrid_update_capacity()
1266 max = cpu_data->max_perf_ratio; in intel_pstate_hwp_set()
1267 min = cpu_data->min_perf_ratio; in intel_pstate_hwp_set()
1269 if (cpu_data->policy == CPUFREQ_POLICY_PERFORMANCE) in intel_pstate_hwp_set()
1280 if (cpu_data->epp_policy == cpu_data->policy) in intel_pstate_hwp_set()
1283 cpu_data->epp_policy = cpu_data->policy; in intel_pstate_hwp_set()
1285 if (cpu_data->policy == CPUFREQ_POLICY_PERFORMANCE) { in intel_pstate_hwp_set()
1287 cpu_data->epp_powersave = epp; in intel_pstate_hwp_set()
1295 if (cpu_data->epp_powersave < 0) in intel_pstate_hwp_set()
1301 * - Policy is not changed in intel_pstate_hwp_set()
1302 * - user has manually changed in intel_pstate_hwp_set()
1303 * - Error reading EPB in intel_pstate_hwp_set()
1309 epp = cpu_data->epp_powersave; in intel_pstate_hwp_set()
1317 WRITE_ONCE(cpu_data->hwp_req_cached, value); in intel_pstate_hwp_set()
1325 u64 value = READ_ONCE(cpu->hwp_req_cached); in intel_pstate_hwp_offline()
1337 value |= HWP_ENERGY_PERF_PREFERENCE(cpu->epp_cached); in intel_pstate_hwp_offline()
1343 cpu->epp_policy = CPUFREQ_POLICY_UNKNOWN; in intel_pstate_hwp_offline()
1352 WRITE_ONCE(cpu->hwp_req_cached, value); in intel_pstate_hwp_offline()
1355 min_perf = HWP_LOWEST_PERF(READ_ONCE(cpu->hwp_cap_cached)); in intel_pstate_hwp_offline()
1365 wrmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, value); in intel_pstate_hwp_offline()
1381 hybrid_clear_cpu_capacity(cpu->cpu); in intel_pstate_hwp_offline()
1414 wrmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, READ_ONCE(cpu->hwp_req_cached)); in intel_pstate_hwp_reenable()
1419 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_suspend()
1421 pr_debug("CPU %d suspending\n", cpu->cpu); in intel_pstate_suspend()
1423 cpu->suspended = true; in intel_pstate_suspend()
1433 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_resume()
1435 pr_debug("CPU %d resuming\n", cpu->cpu); in intel_pstate_resume()
1443 if (cpu->suspended && hwp_active) { in intel_pstate_resume()
1446 /* Re-enable HWP, because "online" has not done that. */ in intel_pstate_resume()
1452 cpu->suspended = false; in intel_pstate_resume()
1473 policy->cpuinfo.max_freq = READ_ONCE(global.no_turbo) ? in __intel_pstate_update_max_freq()
1474 cpudata->pstate.max_freq : cpudata->pstate.turbo_freq; in __intel_pstate_update_max_freq()
1481 struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu); in intel_pstate_update_max_freq()
1492 struct cpudata *cpudata = all_cpu_data[policy->cpu]; in intel_pstate_update_limits()
1541 ret = intel_pstate_update_status(buf, p ? p - buf : count); in store_status()
1558 return -EAGAIN; in show_turbo_pct()
1562 total = cpu->pstate.turbo_pstate - cpu->pstate.min_pstate + 1; in show_turbo_pct()
1563 no_turbo = cpu->pstate.max_pstate - cpu->pstate.min_pstate + 1; in show_turbo_pct()
1565 turbo_pct = 100 - fp_toint(mul_fp(turbo_fp, int_tofp(100))); in show_turbo_pct()
1579 return -EAGAIN; in show_num_pstates()
1582 total = cpu->pstate.turbo_pstate - cpu->pstate.min_pstate + 1; in show_num_pstates()
1593 return -EAGAIN; in show_no_turbo()
1605 return -EINVAL; in store_no_turbo()
1610 return -EAGAIN; in store_no_turbo()
1618 return -EPERM; in store_no_turbo()
1632 int pct = cpu->pstate.max_pstate * 100 / cpu->pstate.turbo_pstate; in store_no_turbo()
1650 unsigned int freq = cpudata->pstate.turbo_freq; in update_cpu_qos_request()
1657 req = policy->driver_data; in update_cpu_qos_request()
1691 return -EINVAL; in store_max_perf_pct()
1696 return -EAGAIN; in store_max_perf_pct()
1720 return -EINVAL; in store_min_perf_pct()
1725 return -EAGAIN; in store_min_perf_pct()
1825 intel_pstate_kobject = kobject_create_and_add("intel_pstate", &dev_root->kobj); in intel_pstate_sysfs_expose_params()
1920 wrmsrq_on_cpu(cpudata->cpu, MSR_HWP_STATUS, 0); in intel_pstate_notify_work()
1951 schedule_delayed_work(&all_cpu_data[this_cpu]->hwp_notify_work, in notify_hwp_interrupt()
1971 wrmsrq_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); in intel_pstate_disable_hwp_interrupt()
1974 cancel_work = cpumask_test_and_clear_cpu(cpudata->cpu, &hwp_intr_enable_mask); in intel_pstate_disable_hwp_interrupt()
1978 cancel_delayed_work_sync(&cpudata->hwp_notify_work); in intel_pstate_disable_hwp_interrupt()
1991 INIT_DELAYED_WORK(&cpudata->hwp_notify_work, intel_pstate_notify_work); in intel_pstate_enable_hwp_interrupt()
1992 cpumask_set_cpu(cpudata->cpu, &hwp_intr_enable_mask); in intel_pstate_enable_hwp_interrupt()
1999 wrmsrq_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, interrupt_mask); in intel_pstate_enable_hwp_interrupt()
2000 wrmsrq_on_cpu(cpudata->cpu, MSR_HWP_STATUS, 0); in intel_pstate_enable_hwp_interrupt()
2006 cpudata->epp_default = intel_pstate_get_epp(cpudata, 0); in intel_pstate_update_epp_defaults()
2010 * - Is equal or less than 0x80 (default balance_perf EPP) in intel_pstate_update_epp_defaults()
2011 * - But less performance oriented than performance EPP in intel_pstate_update_epp_defaults()
2014 if (hwp_forced && cpudata->epp_default <= HWP_EPP_BALANCE_PERFORMANCE && in intel_pstate_update_epp_defaults()
2015 cpudata->epp_default > HWP_EPP_PERFORMANCE) { in intel_pstate_update_epp_defaults()
2016 epp_values[EPP_INDEX_BALANCE_PERFORMANCE] = cpudata->epp_default; in intel_pstate_update_epp_defaults()
2031 cpudata->epp_default = epp_values[EPP_INDEX_BALANCE_PERFORMANCE]; in intel_pstate_update_epp_defaults()
2032 intel_pstate_set_epp(cpudata, cpudata->epp_default); in intel_pstate_update_epp_defaults()
2039 wrmsrq_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); in intel_pstate_hwp_enable()
2041 wrmsrq_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1); in intel_pstate_hwp_enable()
2045 if (cpudata->epp_default >= 0) in intel_pstate_hwp_enable()
2093 vid_fp = cpudata->vid.min + mul_fp( in atom_get_val()
2094 int_tofp(pstate - cpudata->pstate.min_pstate), in atom_get_val()
2095 cpudata->vid.ratio); in atom_get_val()
2097 vid_fp = clamp_t(int32_t, vid_fp, cpudata->vid.min, cpudata->vid.max); in atom_get_val()
2100 if (pstate > cpudata->pstate.max_pstate) in atom_get_val()
2101 vid = cpudata->vid.turbo; in atom_get_val()
2110 /* Defined in Table 35-6 from SDM (Sept 2015) */ in silvermont_get_scaling()
2125 /* Defined in Table 35-10 from SDM (Sept 2015) */ in airmont_get_scaling()
2142 cpudata->vid.min = int_tofp((value >> 8) & 0x7f); in atom_get_vid()
2143 cpudata->vid.max = int_tofp((value >> 16) & 0x7f); in atom_get_vid()
2144 cpudata->vid.ratio = div_fp( in atom_get_vid()
2145 cpudata->vid.max - cpudata->vid.min, in atom_get_vid()
2146 int_tofp(cpudata->pstate.max_pstate - in atom_get_vid()
2147 cpudata->pstate.min_pstate)); in atom_get_vid()
2150 cpudata->vid.turbo = value & 0x7f; in atom_get_vid()
2199 return -ENXIO; in core_get_tdp_ratio()
2228 if (tdp_ratio - 1 == tar_levels) { in core_get_max_pstate()
2277 * Return the hybrid scaling factor for P-cores and use the in hwp_get_cpu_scaling()
2278 * default core scaling for E-cores. in hwp_get_cpu_scaling()
2286 /* Use core scaling on non-hybrid systems. */ in hwp_get_cpu_scaling()
2300 trace_cpu_frequency(pstate * cpu->pstate.scaling, cpu->cpu); in intel_pstate_set_pstate()
2301 cpu->pstate.current_pstate = pstate; in intel_pstate_set_pstate()
2307 wrmsrq_on_cpu(cpu->cpu, MSR_IA32_PERF_CTL, in intel_pstate_set_pstate()
2313 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); in intel_pstate_set_min_pstate()
2320 cpu->pstate.max_pstate_physical = pstate_funcs.get_max_physical(cpu->cpu); in intel_pstate_get_cpu_pstates()
2321 cpu->pstate.min_pstate = pstate_funcs.get_min(cpu->cpu); in intel_pstate_get_cpu_pstates()
2322 cpu->pstate.perf_ctl_scaling = perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2328 cpu->pstate.scaling = pstate_funcs.get_cpu_scaling(cpu->cpu); in intel_pstate_get_cpu_pstates()
2331 cpu->pstate.scaling = perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2339 cpu->pstate.scaling = perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2340 cpu->pstate.max_pstate = pstate_funcs.get_max(cpu->cpu); in intel_pstate_get_cpu_pstates()
2341 cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(cpu->cpu); in intel_pstate_get_cpu_pstates()
2344 if (cpu->pstate.scaling == perf_ctl_scaling) { in intel_pstate_get_cpu_pstates()
2345 cpu->pstate.min_freq = cpu->pstate.min_pstate * perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2346 cpu->pstate.max_freq = cpu->pstate.max_pstate * perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2347 cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * perf_ctl_scaling; in intel_pstate_get_cpu_pstates()
2351 cpu->aperf_mperf_shift = pstate_funcs.get_aperf_mperf_shift(); in intel_pstate_get_cpu_pstates()
2369 u64 hwp_req = READ_ONCE(cpu->hwp_req_cached); in intel_pstate_hwp_boost_up()
2370 u64 hwp_cap = READ_ONCE(cpu->hwp_cap_cached); in intel_pstate_hwp_boost_up()
2390 if (max_limit == min_limit || cpu->hwp_boost_min >= max_limit) in intel_pstate_hwp_boost_up()
2393 if (!cpu->hwp_boost_min) in intel_pstate_hwp_boost_up()
2394 cpu->hwp_boost_min = min_limit; in intel_pstate_hwp_boost_up()
2399 if (cpu->hwp_boost_min < boost_level1) in intel_pstate_hwp_boost_up()
2400 cpu->hwp_boost_min = boost_level1; in intel_pstate_hwp_boost_up()
2401 else if (cpu->hwp_boost_min < HWP_GUARANTEED_PERF(hwp_cap)) in intel_pstate_hwp_boost_up()
2402 cpu->hwp_boost_min = HWP_GUARANTEED_PERF(hwp_cap); in intel_pstate_hwp_boost_up()
2403 else if (cpu->hwp_boost_min == HWP_GUARANTEED_PERF(hwp_cap) && in intel_pstate_hwp_boost_up()
2405 cpu->hwp_boost_min = max_limit; in intel_pstate_hwp_boost_up()
2409 hwp_req = (hwp_req & ~GENMASK_ULL(7, 0)) | cpu->hwp_boost_min; in intel_pstate_hwp_boost_up()
2411 cpu->last_update = cpu->sample.time; in intel_pstate_hwp_boost_up()
2416 if (cpu->hwp_boost_min) { in intel_pstate_hwp_boost_down()
2420 expired = time_after64(cpu->sample.time, cpu->last_update + in intel_pstate_hwp_boost_down()
2423 wrmsrq(MSR_HWP_REQUEST, cpu->hwp_req_cached); in intel_pstate_hwp_boost_down()
2424 cpu->hwp_boost_min = 0; in intel_pstate_hwp_boost_down()
2427 cpu->last_update = cpu->sample.time; in intel_pstate_hwp_boost_down()
2433 cpu->sample.time = time; in intel_pstate_update_util_hwp_local()
2435 if (cpu->sched_flags & SCHED_CPUFREQ_IOWAIT) { in intel_pstate_update_util_hwp_local()
2438 cpu->sched_flags = 0; in intel_pstate_update_util_hwp_local()
2446 if (time_before64(time, cpu->last_io_update + 2 * TICK_NSEC)) in intel_pstate_update_util_hwp_local()
2449 cpu->last_io_update = time; in intel_pstate_update_util_hwp_local()
2464 cpu->sched_flags |= flags; in intel_pstate_update_util_hwp()
2466 if (smp_processor_id() == cpu->cpu) in intel_pstate_update_util_hwp()
2472 struct sample *sample = &cpu->sample; in intel_pstate_calc_avg_perf()
2474 sample->core_avg_perf = div_ext_fp(sample->aperf, sample->mperf); in intel_pstate_calc_avg_perf()
2487 if (cpu->prev_mperf == mperf || cpu->prev_tsc == tsc) { in intel_pstate_sample()
2493 cpu->last_sample_time = cpu->sample.time; in intel_pstate_sample()
2494 cpu->sample.time = time; in intel_pstate_sample()
2495 cpu->sample.aperf = aperf; in intel_pstate_sample()
2496 cpu->sample.mperf = mperf; in intel_pstate_sample()
2497 cpu->sample.tsc = tsc; in intel_pstate_sample()
2498 cpu->sample.aperf -= cpu->prev_aperf; in intel_pstate_sample()
2499 cpu->sample.mperf -= cpu->prev_mperf; in intel_pstate_sample()
2500 cpu->sample.tsc -= cpu->prev_tsc; in intel_pstate_sample()
2502 cpu->prev_aperf = aperf; in intel_pstate_sample()
2503 cpu->prev_mperf = mperf; in intel_pstate_sample()
2504 cpu->prev_tsc = tsc; in intel_pstate_sample()
2512 if (likely(cpu->last_sample_time)) { in intel_pstate_sample()
2521 return mul_ext_fp(cpu->sample.core_avg_perf, cpu_khz); in get_avg_frequency()
2526 return mul_ext_fp(cpu->pstate.max_pstate_physical, in get_avg_pstate()
2527 cpu->sample.core_avg_perf); in get_avg_pstate()
2532 struct sample *sample = &cpu->sample; in get_target_pstate()
2536 busy_frac = div_fp(sample->mperf << cpu->aperf_mperf_shift, in get_target_pstate()
2537 sample->tsc); in get_target_pstate()
2539 if (busy_frac < cpu->iowait_boost) in get_target_pstate()
2540 busy_frac = cpu->iowait_boost; in get_target_pstate()
2542 sample->busy_scaled = busy_frac * 100; in get_target_pstate()
2545 cpu->pstate.max_pstate : cpu->pstate.turbo_pstate; in get_target_pstate()
2548 if (target < cpu->pstate.min_pstate) in get_target_pstate()
2549 target = cpu->pstate.min_pstate; in get_target_pstate()
2552 * If the average P-state during the previous cycle was higher than the in get_target_pstate()
2560 target += (avg_pstate - target) >> 1; in get_target_pstate()
2567 int min_pstate = max(cpu->pstate.min_pstate, cpu->min_perf_ratio); in intel_pstate_prepare_request()
2568 int max_pstate = max(min_pstate, cpu->max_perf_ratio); in intel_pstate_prepare_request()
2575 if (pstate == cpu->pstate.current_pstate) in intel_pstate_update_pstate()
2578 cpu->pstate.current_pstate = pstate; in intel_pstate_update_pstate()
2584 int from = cpu->pstate.current_pstate; in intel_pstate_adjust_pstate()
2590 trace_cpu_frequency(target_pstate * cpu->pstate.scaling, cpu->cpu); in intel_pstate_adjust_pstate()
2593 sample = &cpu->sample; in intel_pstate_adjust_pstate()
2594 trace_pstate_sample(mul_ext_fp(100, sample->core_avg_perf), in intel_pstate_adjust_pstate()
2595 fp_toint(sample->busy_scaled), in intel_pstate_adjust_pstate()
2597 cpu->pstate.current_pstate, in intel_pstate_adjust_pstate()
2598 sample->mperf, in intel_pstate_adjust_pstate()
2599 sample->aperf, in intel_pstate_adjust_pstate()
2600 sample->tsc, in intel_pstate_adjust_pstate()
2602 fp_toint(cpu->iowait_boost * 100)); in intel_pstate_adjust_pstate()
2612 if (smp_processor_id() != cpu->cpu) in intel_pstate_update_util()
2615 delta_ns = time - cpu->last_update; in intel_pstate_update_util()
2619 cpu->iowait_boost = ONE_EIGHTH_FP; in intel_pstate_update_util()
2620 } else if (cpu->iowait_boost >= ONE_EIGHTH_FP) { in intel_pstate_update_util()
2621 cpu->iowait_boost <<= 1; in intel_pstate_update_util()
2622 if (cpu->iowait_boost > int_tofp(1)) in intel_pstate_update_util()
2623 cpu->iowait_boost = int_tofp(1); in intel_pstate_update_util()
2625 cpu->iowait_boost = ONE_EIGHTH_FP; in intel_pstate_update_util()
2627 } else if (cpu->iowait_boost) { in intel_pstate_update_util()
2630 cpu->iowait_boost = 0; in intel_pstate_update_util()
2632 cpu->iowait_boost >>= 1; in intel_pstate_update_util()
2634 cpu->last_update = time; in intel_pstate_update_util()
2635 delta_ns = time - cpu->sample.time; in intel_pstate_update_util()
2750 return -ENOMEM; in intel_pstate_init_cpu()
2754 cpu->cpu = cpunum; in intel_pstate_init_cpu()
2756 cpu->epp_default = -EINVAL; in intel_pstate_init_cpu()
2766 * Re-enable HWP in case this happens after a resume from ACPI in intel_pstate_init_cpu()
2773 cpu->epp_powersave = -EINVAL; in intel_pstate_init_cpu()
2774 cpu->epp_policy = CPUFREQ_POLICY_UNKNOWN; in intel_pstate_init_cpu()
2790 if (cpu->update_util_set) in intel_pstate_set_update_util_hook()
2794 cpu->sample.time = 0; in intel_pstate_set_update_util_hook()
2795 cpufreq_add_update_util_hook(cpu_num, &cpu->update_util, in intel_pstate_set_update_util_hook()
2799 cpu->update_util_set = true; in intel_pstate_set_update_util_hook()
2806 if (!cpu_data->update_util_set) in intel_pstate_clear_update_util_hook()
2810 cpu_data->update_util_set = false; in intel_pstate_clear_update_util_hook()
2817 cpu->pstate.max_freq : cpu->pstate.turbo_freq; in intel_pstate_get_max_freq()
2824 int perf_ctl_scaling = cpu->pstate.perf_ctl_scaling; in intel_pstate_update_perf_limits()
2840 if (hwp_active && cpu->pstate.scaling != perf_ctl_scaling) { in intel_pstate_update_perf_limits()
2850 cpu->cpu, min_policy_perf, max_policy_perf); in intel_pstate_update_perf_limits()
2854 cpu->min_perf_ratio = min_policy_perf; in intel_pstate_update_perf_limits()
2855 cpu->max_perf_ratio = max_policy_perf; in intel_pstate_update_perf_limits()
2857 int turbo_max = cpu->pstate.turbo_pstate; in intel_pstate_update_perf_limits()
2860 /* Global limits are in percent of the maximum turbo P-state. */ in intel_pstate_update_perf_limits()
2865 pr_debug("cpu:%d global_min:%d global_max:%d\n", cpu->cpu, in intel_pstate_update_perf_limits()
2868 cpu->min_perf_ratio = max(min_policy_perf, global_min); in intel_pstate_update_perf_limits()
2869 cpu->min_perf_ratio = min(cpu->min_perf_ratio, max_policy_perf); in intel_pstate_update_perf_limits()
2870 cpu->max_perf_ratio = min(max_policy_perf, global_max); in intel_pstate_update_perf_limits()
2871 cpu->max_perf_ratio = max(min_policy_perf, cpu->max_perf_ratio); in intel_pstate_update_perf_limits()
2874 cpu->min_perf_ratio = min(cpu->min_perf_ratio, in intel_pstate_update_perf_limits()
2875 cpu->max_perf_ratio); in intel_pstate_update_perf_limits()
2878 pr_debug("cpu:%d max_perf_ratio:%d min_perf_ratio:%d\n", cpu->cpu, in intel_pstate_update_perf_limits()
2879 cpu->max_perf_ratio, in intel_pstate_update_perf_limits()
2880 cpu->min_perf_ratio); in intel_pstate_update_perf_limits()
2887 if (!policy->cpuinfo.max_freq) in intel_pstate_set_policy()
2888 return -ENODEV; in intel_pstate_set_policy()
2890 pr_debug("set_policy cpuinfo.max %u policy->max %u\n", in intel_pstate_set_policy()
2891 policy->cpuinfo.max_freq, policy->max); in intel_pstate_set_policy()
2893 cpu = all_cpu_data[policy->cpu]; in intel_pstate_set_policy()
2894 cpu->policy = policy->policy; in intel_pstate_set_policy()
2898 intel_pstate_update_perf_limits(cpu, policy->min, policy->max); in intel_pstate_set_policy()
2900 if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) { in intel_pstate_set_policy()
2901 int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); in intel_pstate_set_policy()
2907 intel_pstate_clear_update_util_hook(policy->cpu); in intel_pstate_set_policy()
2910 intel_pstate_set_update_util_hook(policy->cpu); in intel_pstate_set_policy()
2920 intel_pstate_clear_update_util_hook(policy->cpu); in intel_pstate_set_policy()
2921 intel_pstate_hwp_set(policy->cpu); in intel_pstate_set_policy()
2924 * policy->cur is never updated with the intel_pstate driver, but it in intel_pstate_set_policy()
2927 policy->cur = policy->min; in intel_pstate_set_policy()
2938 cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate && in intel_pstate_adjust_policy_max()
2939 policy->max < policy->cpuinfo.max_freq && in intel_pstate_adjust_policy_max()
2940 policy->max > cpu->pstate.max_freq) { in intel_pstate_adjust_policy_max()
2941 pr_debug("policy->max > max non turbo frequency\n"); in intel_pstate_adjust_policy_max()
2942 policy->max = policy->cpuinfo.max_freq; in intel_pstate_adjust_policy_max()
2954 cpu->pstate.max_freq : cpu->pstate.turbo_freq; in intel_pstate_verify_cpu_policy()
2958 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, max_freq); in intel_pstate_verify_cpu_policy()
2965 intel_pstate_verify_cpu_policy(all_cpu_data[policy->cpu], policy); in intel_pstate_verify_policy()
2972 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_cpu_offline()
2974 pr_debug("CPU %d going offline\n", cpu->cpu); in intel_cpufreq_cpu_offline()
2976 if (cpu->suspended) in intel_cpufreq_cpu_offline()
2997 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_cpu_online()
2999 pr_debug("CPU %d going online\n", cpu->cpu); in intel_pstate_cpu_online()
3005 * Re-enable HWP and clear the "suspended" flag to let "resume" in intel_pstate_cpu_online()
3009 cpu->suspended = false; in intel_pstate_cpu_online()
3019 intel_pstate_clear_update_util_hook(policy->cpu); in intel_pstate_cpu_offline()
3026 pr_debug("CPU %d exiting\n", policy->cpu); in intel_pstate_cpu_exit()
3028 policy->fast_switch_possible = false; in intel_pstate_cpu_exit()
3036 rc = intel_pstate_init_cpu(policy->cpu); in __intel_pstate_cpu_init()
3040 cpu = all_cpu_data[policy->cpu]; in __intel_pstate_cpu_init()
3042 cpu->max_perf_ratio = 0xFF; in __intel_pstate_cpu_init()
3043 cpu->min_perf_ratio = 0; in __intel_pstate_cpu_init()
3046 policy->cpuinfo.min_freq = cpu->pstate.min_freq; in __intel_pstate_cpu_init()
3047 policy->cpuinfo.max_freq = READ_ONCE(global.no_turbo) ? in __intel_pstate_cpu_init()
3048 cpu->pstate.max_freq : cpu->pstate.turbo_freq; in __intel_pstate_cpu_init()
3050 policy->min = policy->cpuinfo.min_freq; in __intel_pstate_cpu_init()
3051 policy->max = policy->cpuinfo.max_freq; in __intel_pstate_cpu_init()
3055 policy->fast_switch_possible = true; in __intel_pstate_cpu_init()
3071 policy->policy = CPUFREQ_POLICY_POWERSAVE; in intel_pstate_cpu_init()
3074 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_cpu_init()
3076 cpu->epp_cached = intel_pstate_get_epp(cpu, 0); in intel_pstate_cpu_init()
3098 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_verify_policy()
3101 intel_pstate_update_perf_limits(cpu, policy->min, policy->max); in intel_cpufreq_verify_policy()
3110 * core_avg_perf) is not needed and so is re-assigned to indicate if the
3111 * driver call was via the normal or fast switch path. Various graphs
3113 * (or performance or core_avg_perf) have a fixed y-axis from 0 to 100%,
3115 * 90 to indicate the fast switch path through the driver.
3132 sample = &cpu->sample; in intel_cpufreq_trace()
3136 cpu->pstate.current_pstate, in intel_cpufreq_trace()
3137 sample->mperf, in intel_cpufreq_trace()
3138 sample->aperf, in intel_cpufreq_trace()
3139 sample->tsc, in intel_cpufreq_trace()
3141 fp_toint(cpu->iowait_boost * 100)); in intel_cpufreq_trace()
3147 u64 prev = READ_ONCE(cpu->hwp_req_cached), value = prev; in intel_cpufreq_hwp_update()
3161 WRITE_ONCE(cpu->hwp_req_cached, value); in intel_cpufreq_hwp_update()
3165 wrmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, value); in intel_cpufreq_hwp_update()
3175 wrmsrq_on_cpu(cpu->cpu, MSR_IA32_PERF_CTL, in intel_cpufreq_perf_ctl_update()
3182 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_update_pstate()
3183 int old_pstate = cpu->pstate.current_pstate; in intel_cpufreq_update_pstate()
3187 int max_pstate = policy->strict_target ? in intel_cpufreq_update_pstate()
3188 target_pstate : cpu->max_perf_ratio; in intel_cpufreq_update_pstate()
3196 cpu->pstate.current_pstate = target_pstate; in intel_cpufreq_update_pstate()
3208 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_target()
3212 freqs.old = policy->cur; in intel_cpufreq_target()
3220 freqs.new = target_pstate * cpu->pstate.scaling; in intel_cpufreq_target()
3230 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_fast_switch()
3237 return target_pstate * cpu->pstate.scaling; in intel_cpufreq_fast_switch()
3246 u64 hwp_cap = READ_ONCE(cpu->hwp_cap_cached); in intel_cpufreq_adjust_perf()
3247 int old_pstate = cpu->pstate.current_pstate; in intel_cpufreq_adjust_perf()
3264 if (min_pstate < cpu->pstate.min_pstate) in intel_cpufreq_adjust_perf()
3265 min_pstate = cpu->pstate.min_pstate; in intel_cpufreq_adjust_perf()
3267 if (min_pstate < cpu->min_perf_ratio) in intel_cpufreq_adjust_perf()
3268 min_pstate = cpu->min_perf_ratio; in intel_cpufreq_adjust_perf()
3270 if (min_pstate > cpu->max_perf_ratio) in intel_cpufreq_adjust_perf()
3271 min_pstate = cpu->max_perf_ratio; in intel_cpufreq_adjust_perf()
3273 max_pstate = min(cap_pstate, cpu->max_perf_ratio); in intel_cpufreq_adjust_perf()
3281 cpu->pstate.current_pstate = target_pstate; in intel_cpufreq_adjust_perf()
3292 dev = get_cpu_device(policy->cpu); in intel_cpufreq_cpu_init()
3294 return -ENODEV; in intel_cpufreq_cpu_init()
3300 policy->cpuinfo.transition_latency = INTEL_CPUFREQ_TRANSITION_LATENCY; in intel_cpufreq_cpu_init()
3302 policy->cur = policy->cpuinfo.min_freq; in intel_cpufreq_cpu_init()
3306 ret = -ENOMEM; in intel_cpufreq_cpu_init()
3310 cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_cpu_init()
3315 policy->transition_delay_us = INTEL_CPUFREQ_TRANSITION_DELAY_HWP; in intel_cpufreq_cpu_init()
3319 rdmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, &value); in intel_cpufreq_cpu_init()
3320 WRITE_ONCE(cpu->hwp_req_cached, value); in intel_cpufreq_cpu_init()
3322 cpu->epp_cached = intel_pstate_get_epp(cpu, value); in intel_cpufreq_cpu_init()
3324 policy->transition_delay_us = INTEL_CPUFREQ_TRANSITION_DELAY; in intel_cpufreq_cpu_init()
3327 freq = DIV_ROUND_UP(cpu->pstate.turbo_freq * global.min_perf_pct, 100); in intel_cpufreq_cpu_init()
3329 ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MIN, in intel_cpufreq_cpu_init()
3332 dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret); in intel_cpufreq_cpu_init()
3336 freq = DIV_ROUND_UP(cpu->pstate.turbo_freq * global.max_perf_pct, 100); in intel_cpufreq_cpu_init()
3338 ret = freq_qos_add_request(&policy->constraints, req + 1, FREQ_QOS_MAX, in intel_cpufreq_cpu_init()
3341 dev_err(dev, "Failed to add max-freq constraint (%d)\n", ret); in intel_cpufreq_cpu_init()
3345 policy->driver_data = req; in intel_cpufreq_cpu_init()
3363 req = policy->driver_data; in intel_cpufreq_cpu_exit()
3377 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_suspend()
3378 u64 value = READ_ONCE(cpu->hwp_req_cached); in intel_cpufreq_suspend()
3386 wrmsrq_on_cpu(cpu->cpu, MSR_HWP_REQUEST, value); in intel_cpufreq_suspend()
3387 WRITE_ONCE(cpu->hwp_req_cached, value); in intel_cpufreq_suspend()
3473 return -EINVAL; in intel_pstate_update_status()
3476 return -EBUSY; in intel_pstate_update_status()
3506 return -EINVAL; in intel_pstate_update_status()
3519 return -ENODEV; in intel_pstate_msrs_not_valid()
3526 pstate_funcs.get_max = funcs->get_max; in copy_cpu_funcs()
3527 pstate_funcs.get_max_physical = funcs->get_max_physical; in copy_cpu_funcs()
3528 pstate_funcs.get_min = funcs->get_min; in copy_cpu_funcs()
3529 pstate_funcs.get_turbo = funcs->get_turbo; in copy_cpu_funcs()
3530 pstate_funcs.get_scaling = funcs->get_scaling; in copy_cpu_funcs()
3531 pstate_funcs.get_val = funcs->get_val; in copy_cpu_funcs()
3532 pstate_funcs.get_vid = funcs->get_vid; in copy_cpu_funcs()
3533 pstate_funcs.get_aperf_mperf_shift = funcs->get_aperf_mperf_shift; in copy_cpu_funcs()
3551 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); in intel_pstate_no_acpi_pss()
3556 if (pss && pss->type == ACPI_TYPE_PACKAGE) { in intel_pstate_no_acpi_pss()
3594 if (acpi_has_method(pr->handle, "_PPC")) in intel_pstate_has_acpi_ppc()
3606 /* Hardware vendor-specific info that has its own power management modes */
3609 {"ORACLE", "X4-2 ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3610 {"ORACLE", "X4-2L ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3611 {"ORACLE", "X4-2B ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3612 {"ORACLE", "X3-2 ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3613 {"ORACLE", "X3-2L ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3614 {"ORACLE", "X3-2B ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3621 {"ORACLE", "X6-2 ", 0, ACPI_SIG_FADT, all_versions, NULL, PPC},
3664 * It may be unsafe to request P-states control from SMM if _PPC support in intel_pstate_request_control_from_smm()
3745 /* Without EPP support, don't expose EPP-related sysfs attributes. */ in hwp_check_epp()
3767 return -ENODEV; in intel_pstate_init()
3774 pr_info("P-states controlled by the platform\n"); in intel_pstate_init()
3775 return -ENODEV; in intel_pstate_init()
3791 return -ENODEV; in intel_pstate_init()
3807 hwp_mode_bdw = id->driver_data; in intel_pstate_init()
3822 return -ENODEV; in intel_pstate_init()
3827 return -ENODEV; in intel_pstate_init()
3830 copy_cpu_funcs((struct pstate_funcs *)id->driver_data); in intel_pstate_init()
3835 return -ENODEV; in intel_pstate_init()
3843 return -ENOTSUPP; in intel_pstate_init()
3845 pr_info("Intel P-state driver initializing\n"); in intel_pstate_init()
3849 return -ENOMEM; in intel_pstate_init()
3863 FIELD_GET(POWERSAVE_MASK, id->driver_data); in intel_pstate_init()
3865 FIELD_GET(BALANCE_POWER_MASK, id->driver_data); in intel_pstate_init()
3867 FIELD_GET(BALANCE_PERFORMANCE_MASK, id->driver_data); in intel_pstate_init()
3869 FIELD_GET(PERFORMANCE_MASK, id->driver_data); in intel_pstate_init()
3878 hybrid_scaling_factor = hybrid_id->driver_data; in intel_pstate_init()
3913 return -EINVAL; in intel_pstate_setup()
3945 MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors");