alistair23-linux/Documentation/power
Vitaly Kuznetsov 89af7ba574 cpu-hotplug: convert cpu_hotplug_disabled to a counter
As a prerequisite to exporting cpu_hotplug_enable/cpu_hotplug_disable
functions to modules we need to convert cpu_hotplug_disabled to a counter
to properly support disable -> disable -> enable call sequences. E.g.
after Hyper-V vmbus module (which is supposed to be the first user of
exported cpu_hotplug_enable/cpu_hotplug_disable) did cpu_hotplug_disable()
hibernate path calls disable_nonboot_cpus() and if we hit an error in
_cpu_down() enable_nonboot_cpus() will be called on the failure path (thus
making cpu_hotplug_disabled = 0 and leaving cpu hotplug in 'enabled'
state). Same problem is possible if more than 1 module use
cpu_hotplug_disable/cpu_hotplug_enable on their load/unload paths. When
one of these modules is been unloaded it is logical to leave cpu hotplug
in 'disabled' state.

To support the change we need to increse cpu_hotplug_disabled counter
in disable_nonboot_cpus() unconditionally as all users of
disable_nonboot_cpus() are supposed to do enable_nonboot_cpus() in case
an error was returned.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05 11:46:44 -07:00
..
powercap
regulator regulator: Rename regulator_set_optimum_mode 2015-03-09 18:32:25 +00:00
00-INDEX
apm-acpi.txt
basic-pm-debugging.txt PM / sleep: add configurable delay for pm_test 2015-02-26 01:21:26 +01:00
charger-manager.txt Documentation: Charger Manager: Fix spelling mistakes 2014-09-16 11:01:27 +02:00
devices.txt
drivers-testing.txt
freezing-of-tasks.txt
interface.txt
notifiers.txt
opp.txt PM / OPP: Remove ARCH_HAS_OPP 2014-07-23 00:51:30 +02:00
pci.txt
pm_qos_interface.txt PM / QoS: Add PM_QOS_MEMORY_BANDWIDTH class 2014-09-25 01:18:33 +02:00
power_supply_class.txt power_supply: Add boot and calibration attributes 2014-09-06 21:05:04 +02:00
runtime_pm.txt PM / runtime: add note about re-calling in during device probe() 2015-05-13 00:02:38 +02:00
s2ram.txt PM / sleep: Mention async suspend in PM_TRACE documentation 2015-01-30 01:29:46 +01:00
states.txt
suspend-and-cpuhotplug.txt cpu-hotplug: convert cpu_hotplug_disabled to a counter 2015-08-05 11:46:44 -07:00
suspend-and-interrupts.txt genirq / PM: describe IRQF_COND_SUSPEND 2015-03-06 01:28:14 +01:00
swsusp-and-swap-files.txt
swsusp-dmcrypt.txt
swsusp.txt PM / hibernate: clarify resume documentation 2015-07-07 01:18:11 +02:00
tricks.txt
userland-swsusp.txt Documentation: power: Fix typo in Documentation/power 2014-11-08 09:15:14 -05:00
video.txt