linux/drivers/cpufreq
Rafael J. Wysocki 27d02a4d9d cpufreq: Make cpufreq_online() call driver->offline() on errors
[ Upstream commit 3b7180573c250eb6e2a7eec54ae91f27472332ea ]

In the CPU removal path the ->offline() callback provided by the
driver is always invoked before ->exit(), but in the cpufreq_online()
error path it is not, so ->exit() is expected to somehow know the
context in which it has been called and act accordingly.

That is less than straightforward, so make cpufreq_online() invoke
the driver's ->offline() callback, if present, on errors before
->exit() too.

This only potentially affects intel_pstate.

Fixes: 91a12e91dc ("cpufreq: Allow light-weight tear down and bring up of CPUs")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:53:25 +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 acpi-cpufreq: Honor _PSD table setting on new AMD CPUs 2020-11-05 11:43:25 +01:00
amd_freq_sensitivity.c
arm_big_little.c
arm_big_little.h
armada-8k-cpufreq.c cpufreq: ap806: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
armada-37xx-cpufreq.c cpufreq: armada-37xx: Fix determining base CPU frequency 2021-05-14 09:44:21 +02:00
bmips-cpufreq.c
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove() 2021-03-04 10:26:14 +01:00
cppc_cpufreq.c
cpufreq-dt-platdev.c cpufreq: blacklist Arm Vexpress platforms in cpufreq-dt-platdev 2021-03-30 14:35:21 +02:00
cpufreq-dt.c
cpufreq-dt.h
cpufreq-nforce2.c
cpufreq.c cpufreq: Make cpufreq_online() call driver->offline() on errors 2021-07-14 16:53: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 cpufreq: highbank: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
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: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available 2021-03-04 10:26:50 +01:00
kirkwood-cpufreq.c
longhaul.c
longhaul.h
longrun.c
loongson1-cpufreq.c cpufreq: loongson1: Add missing MODULE_ALIAS 2020-12-30 11:51:20 +01:00
loongson2_cpufreq.c
maple-cpufreq.c
mediatek-cpufreq.c cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
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 cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() 2021-01-17 14:05:35 +01:00
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier 2020-10-29 09:57:51 +01: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 cpufreq: qcom: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
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 cpufreq: scpi: Add missing MODULE_ALIAS 2020-12-30 11:51:20 +01:00
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 cpufreq: st: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:19 +01:00
sun50i-cpufreq-nvmem.c cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:51:20 +01:00
tango-cpufreq.c
tegra20-cpufreq.c
tegra124-cpufreq.c
tegra186-cpufreq.c
ti-cpufreq.c
unicore2-cpufreq.c
vexpress-spc-cpufreq.c