···163163164164config CPU_FREQ_GOV_CONSERVATIVE165165 tristate "'conservative' cpufreq governor"166166- depends on CPU_FREQ167166 select CPU_FREQ_GOV_COMMON168167 help169168 'conservative' - this driver is rather similar to the 'ondemand'···187188188189config CPU_FREQ_GOV_SCHEDUTIL189190 bool "'schedutil' cpufreq policy governor"190190- depends on CPU_FREQ && SMP191191+ depends on SMP191192 select CPU_FREQ_GOV_ATTR_SET192193 select IRQ_WORK193194 help···364365365366 If in doubt, say N.366367367367-endif368368+endif # CPU_FREQ368369369370endmenu
+24-7
drivers/cpufreq/acpi-cpufreq.c
···675675}676676#endif677677678678+static void acpi_cpufreq_resolve_max_freq(struct cpufreq_policy *policy,679679+ unsigned int pss_max_freq)680680+{681681+#ifdef CONFIG_ACPI_CPPC_LIB682682+ u64 max_speed = cppc_get_dmi_max_khz();683683+ /*684684+ * Use DMI "Max Speed" if it looks plausible: must be685685+ * above _PSS P0 frequency and within 2x of it.686686+ */687687+ if (max_speed > pss_max_freq && max_speed < pss_max_freq * 2) {688688+ policy->cpuinfo.max_freq = max_speed;689689+ return;690690+ }691691+#endif692692+ /*693693+ * If the maximum "boost" frequency is unknown, ask the arch694694+ * scale-invariance code to use the "nominal" performance for695695+ * CPU utilization scaling so as to prevent the schedutil696696+ * governor from selecting inadequate CPU frequencies.697697+ */698698+ arch_set_max_freq_ratio(true);699699+}700700+678701static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)679702{680703 struct cpufreq_frequency_table *freq_table;···872849873850 policy->cpuinfo.max_freq = freq * max_boost_ratio >> SCHED_CAPACITY_SHIFT;874851 } else {875875- /*876876- * If the maximum "boost" frequency is unknown, ask the arch877877- * scale-invariance code to use the "nominal" performance for878878- * CPU utilization scaling so as to prevent the schedutil879879- * governor from selecting inadequate CPU frequencies.880880- */881881- arch_set_max_freq_ratio(true);852852+ acpi_cpufreq_resolve_max_freq(policy, freq_table[0].frequency);882853 }883854884855 policy->freq_table = freq_table;
-2
drivers/cpufreq/amd-pstate.c
···769769 else if (policy->cpuinfo.max_freq > nominal_freq)770770 policy->cpuinfo.max_freq = nominal_freq;771771772772- policy->max = policy->cpuinfo.max_freq;773773-774772 if (cppc_state == AMD_PSTATE_PASSIVE) {775773 ret = freq_qos_update_request(&cpudata->req[1], policy->cpuinfo.max_freq);776774 if (ret < 0)