linux/drivers/cpufreq
Rafael J. Wysocki 5861e84d71 cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode
[ Upstream commit de002c55ca ]

Because intel_pstate_set_energy_pref_index() reads and writes the
MSR_HWP_REQUEST register without using the cached value of it used by
intel_pstate_hwp_boost_up() and intel_pstate_hwp_boost_down(), those
functions may overwrite the value written by it and so the EPP value
set via sysfs may be lost.

To avoid that, make intel_pstate_set_energy_pref_index() take the
cached value of MSR_HWP_REQUEST just like the other two routines
mentioned above and update it with the new EPP value coming from
user space in addition to updating the MSR.

Note that the MSR itself still needs to be updated too in case
hwp_boost is unset or the boosting mechanism is not active at the
EPP change time.

Fixes: e0efd5be63 ("cpufreq: intel_pstate: Add HWP boost utility and sched util hooks")
Reported-by: Francisco Jerez <currojerez@riseup.net>
Cc: 4.18+ <stable@vger.kernel.org> # 4.18+: 3da97d4db8ee cpufreq: intel_pstate: Rearrange ...
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:53 +02:00
..
Kconfig
Kconfig.arm cpufreq: ap806: fix cpufreq driver needs ap cpu clk 2020-08-19 08:16:18 +02:00
Kconfig.powerpc
Kconfig.x86
Makefile
acpi-cpufreq.c
amd_freq_sensitivity.c
arm_big_little.c
arm_big_little.h
armada-8k-cpufreq.c
armada-37xx-cpufreq.c cpufreq: dt: fix oops on armada37xx 2020-08-19 08:16:25 +02:00
bmips-cpufreq.c
brcmstb-avs-cpufreq.c
cppc_cpufreq.c
cpufreq-dt-platdev.c
cpufreq-dt.c
cpufreq-dt.h
cpufreq-nforce2.c
cpufreq.c cpufreq: Fix locking issues with governors 2020-08-19 08:16:25 +02:00
cpufreq_conservative.c
cpufreq_governor.c
cpufreq_governor.h
cpufreq_governor_attr_set.c
cpufreq_ondemand.c
cpufreq_ondemand.h
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c
cpufreq_userspace.c
davinci-cpufreq.c
e_powersaver.c
elanfreq.c
freq_table.c
gx-suspmod.c
highbank-cpufreq.c
ia64-acpi-cpufreq.c
imx-cpufreq-dt.c
imx6q-cpufreq.c cpufreq: imx6q: fix error handling 2020-04-17 10:50:03 +02:00
intel_pstate.c cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode 2020-09-03 11:26:53 +02:00
kirkwood-cpufreq.c
longhaul.c
longhaul.h
longrun.c
loongson1-cpufreq.c
loongson2_cpufreq.c
maple-cpufreq.c
mediatek-cpufreq.c
mvebu-cpufreq.c
omap-cpufreq.c
p4-clockmod.c
pasemi-cpufreq.c
pcc-cpufreq.c
pmac32-cpufreq.c
pmac64-cpufreq.c
powernow-k6.c
powernow-k7.c
powernow-k7.h
powernow-k8.c
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Fix use-after-free 2020-04-17 10:50:22 +02:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c
qcom-cpufreq-hw.c
qcom-cpufreq-nvmem.c
qoriq-cpufreq.c
raspberrypi-cpufreq.c
s3c24xx-cpufreq-debugfs.c
s3c24xx-cpufreq.c
s3c64xx-cpufreq.c
s3c2410-cpufreq.c
s3c2412-cpufreq.c
s3c2416-cpufreq.c
s3c2440-cpufreq.c
s5pv210-cpufreq.c
sa1100-cpufreq.c
sa1110-cpufreq.c
sc520_freq.c
scmi-cpufreq.c
scpi-cpufreq.c
sfi-cpufreq.c
sh-cpufreq.c
sparc-us2e-cpufreq.c
sparc-us3-cpufreq.c
spear-cpufreq.c
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c
speedstep-lib.h
speedstep-smi.c
sti-cpufreq.c
sun50i-cpufreq-nvmem.c
tango-cpufreq.c
tegra20-cpufreq.c
tegra124-cpufreq.c
tegra186-cpufreq.c
ti-cpufreq.c
unicore2-cpufreq.c
vexpress-spc-cpufreq.c