linux/drivers/cpufreq
Rafael J. Wysocki d2d5c129d0 cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq
If arch_scale_freq_ref() is not defined for a given arch (like x86, for
example), cpufreq_update_pressure() will always set cpufreq_pressure to
zero for all CPUs in the system, which is generally problematic on
systems with asymmetric capacity [1].

However, in the absence of arch_scale_freq_ref(), it is reasonable
to assume that cpuinfo.max_freq is the maximum sustainable frequency
for the given cpufreq policy.  Moreover, there are cases in which
arch_scale_freq_ref() would need to be defined to return essentially
the cpuinfo.max_freq value anyway (for example, intel_pstate on
hybrid platforms).

For the above reasons, update cpufreq_update_pressure() to fall back to
using cpuinfo.max_freq as the reference frequency if zero is returned by
arch_scale_freq_ref().

Fixes: 75d659317b ("cpufreq: Add a cpufreq pressure feedback for the scheduler")
Link: https://lore.kernel.org/lkml/CAKfTPtBuRLfYNnR4w--cFZYZy-R8gaPEgVwCcaMmbCcJ2H-muQ@mail.gmail.com/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Tested-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> # cluster scheduling
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://patch.msgid.link/5086499.GXAFRqVoOG@rafael.j.wysocki
2026-07-09 20:31:57 +02:00
..
acpi-cpufreq.c cpufreq: acpi-cpufreq: use DMI max speed when CPPC is unavailable 2026-03-25 14:29:05 +01:00
airoha-cpufreq.c cpufreq: airoha: Convert to of_machine_get_match() 2026-03-13 17:00:04 -05:00
amd_freq_sensitivity.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
amd-pstate-trace.c
amd-pstate-trace.h amd-pstate: Introduce a tracepoint trace_amd_pstate_cppc_req2() 2026-04-02 11:28:31 -05:00
amd-pstate-ut.c cpufreq/amd-pstate-ut: Disable dynamic_epp after the mode switch 2026-05-26 12:39:28 +02:00
amd-pstate.c tracing: Updates for v7.2: 2026-06-18 20:53:00 -07:00
amd-pstate.h cpufreq/amd-pstate: drop stale @epp_cached kdoc 2026-05-26 10:03:15 -05:00
apple-soc-cpufreq.c cpufreq: apple-soc: Use FIELD_MODIFY() 2026-05-05 09:29:21 +05:30
armada-8k-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
armada-37xx-cpufreq.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
bmips-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs: Use scope-based cleanup helper 2025-08-29 11:28:27 +05:30
cppc_cpufreq.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
cpufreq_conservative.c cpufreq: conservative: Simplify frequency limit handling 2026-05-22 18:41:24 +02:00
cpufreq_governor_attr_set.c
cpufreq_governor.c Updates for the NOHZ subsystem: 2026-06-15 13:48:52 +05:30
cpufreq_governor.h Merge back earlier cpufreq material for 7.1 2026-03-27 11:57:31 +01:00
cpufreq_ondemand.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpufreq_ondemand.h cpufreq: ondemand: Update the efficient idle check for Intel extended Families 2025-09-10 12:25:08 +02:00
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpufreq_userspace.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpufreq-dt-platdev.c cpufreq: Add QCS8300 to cpufreq-dt-platdev blocklist 2026-03-17 14:21:32 +05:30
cpufreq-dt.c cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency 2025-10-01 13:56:24 +02:00
cpufreq-dt.h cpufreq: dt: Add register helper 2025-07-09 13:41:33 +05:30
cpufreq-nforce2.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
cpufreq.c cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq 2026-07-09 20:31:57 +02:00
davinci-cpufreq.c cpufreq: davinci: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:12 +05:30
e_powersaver.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
freq_table.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
gx-suspmod.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
highbank-cpufreq.c
imx-cpufreq-dt.c cpufreq: Switch back to struct platform_driver::remove() 2024-10-28 12:24:39 +01:00
imx6q-cpufreq.c cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency 2025-10-01 13:56:24 +02:00
intel_pstate.c cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF() 2026-07-09 20:28:58 +02:00
Kconfig cpufreq: clean up dead code in Kconfig 2026-04-01 15:58:01 +02:00
Kconfig.arm cpufreq: qcom: Unify user-visible "Qualcomm" name 2026-05-05 08:15:34 +05:30
Kconfig.powerpc cpufreq: ppc_cbe: Remove powerpc Cell driver 2025-02-26 21:15:09 +05:30
Kconfig.x86 x86/cpu updates for v7.2: 2026-06-15 15:25:17 +05:30
kirkwood-cpufreq.c cpufreq: kirkwood: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:12 +05:30
longhaul.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
longhaul.h
longrun.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
loongson2_cpufreq.c cpufreq: loongson: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:12 +05:30
loongson3_cpufreq.c cpufreq: loongson: Set .set_boost directly 2025-02-07 09:45:15 +05:30
Makefile cpufreq: elanfreq: Drop support for AMD Elan SC4* 2026-05-22 18:42:19 +02:00
mediatek-cpufreq-hw.c cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency 2025-10-01 13:56:24 +02:00
mediatek-cpufreq.c cpufreq: mediatek: Simplify with of_machine_get_match_data() 2025-11-26 19:42:21 -06:00
mvebu-cpufreq.c cpufreq: Init cpufreq only for present CPUs 2025-03-17 11:29:18 +05:30
p4-clockmod.c x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() 2026-06-08 10:01:49 +02:00
pasemi-cpufreq.c cpufreq: pasemi: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:12 +05:30
pcc-cpufreq.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
pmac32-cpufreq.c cpufreq: pmac: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:13 +05:30
pmac64-cpufreq.c cpufreq: pmac: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:13 +05:30
powernow-k6.c cpufreq: powernow: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:13 +05:30
powernow-k7.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
powernow-k7.h
powernow-k8.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
powernow-k8.h
powernv-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
powernv-trace.h PM: cpufreq: powernv/tracing: Move powernv_throttle trace event 2025-07-21 16:40:56 -04:00
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
qcom-cpufreq-hw.c cpufreq: qcom: Add cpufreq scaling support for Qualcomm Shikra SoC 2026-06-08 10:58:07 +05:30
qcom-cpufreq-nvmem.c cpufreq: qcom-nvmem: Convert to of_machine_get_match() 2026-03-13 17:00:04 -05:00
qoriq-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
raspberrypi-cpufreq.c cpufreq: Switch back to struct platform_driver::remove() 2024-10-28 12:24:39 +01:00
rcpufreq_dt.rs rust: platform: make Driver trait lifetime-parameterized 2026-05-27 16:23:31 +02:00
s3c64xx-cpufreq.c cpufreq: s3c64xx: Fix compilation warning 2025-01-23 20:47:32 +01:00
s5pv210-cpufreq.c cpufreq: s5pv210: Simplify with scoped for each OF child loop 2026-02-03 20:58:13 -06:00
sa1110-cpufreq.c
scmi-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
scpi-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sh-cpufreq.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00
sparc-us2e-cpufreq.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sparc-us3-cpufreq.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
spear-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
speedstep-centrino.c x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() 2026-06-08 10:01:49 +02:00
speedstep-ich.c cpufreq: speedstep: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:14 +05:30
speedstep-lib.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
speedstep-lib.h cpufreq: speedstep-lib: Use int type to store negative error codes 2025-09-05 20:28:46 +02:00
speedstep-smi.c cpufreq: speedstep: Stop setting cpufreq_driver->attr field 2025-02-07 09:45:14 +05:30
sti-cpufreq.c
sun50i-cpufreq-nvmem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra20-cpufreq.c
tegra124-cpufreq.c drivers: cpufreq: add Tegra114 support 2025-07-15 08:37:35 +05:30
tegra186-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra194-cpufreq.c cpufreq: tegra194: Rename Tegra239 to Tegra238 2026-03-03 09:46:04 +05:30
ti-cpufreq.c cpufreq: ti: Add EPROBE_DEFER for K3 SoCs 2026-06-08 11:16:42 +05:30
vexpress-spc-cpufreq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
virtual-cpufreq.c cpufreq: Remove driver default policy->min/max init 2026-06-08 18:42:14 +02:00