OpenCloudOS-Kernel/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 PowerCap: Documentation 2013-10-17 00:36:06 +02:00
regulator regulator: Rename regulator_set_optimum_mode 2015-03-09 18:32:25 +00:00
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
apm-acpi.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
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 PM / sleep: Update device PM documentation to cover direct_complete 2014-05-16 23:15:44 +02:00
drivers-testing.txt PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt 2010-12-24 15:02:41 +01:00
freezing-of-tasks.txt suspend: enable freeze timeout configuration through sys 2013-02-09 22:32:48 +01:00
interface.txt PM: Documentation update for freeze state 2013-05-14 01:41:37 +02:00
notifiers.txt PM / hibernate: Correct documentation 2013-05-14 01:58:43 +02:00
opp.txt PM / OPP: Remove ARCH_HAS_OPP 2014-07-23 00:51:30 +02:00
pci.txt PM/PCI: Update PCI power management documentation 2010-05-18 15:01:58 -07:00
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 PM / sleep: Introduce command line argument for sleep state enumeration 2014-05-26 13:40:59 +02:00
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 typo fixes 2007-10-20 01:34:40 +02:00
swsusp-dmcrypt.txt
swsusp.txt PM / hibernate: clarify resume documentation 2015-07-07 01:18:11 +02:00
tricks.txt update email address 2010-07-19 10:56:54 +02:00
userland-swsusp.txt Documentation: power: Fix typo in Documentation/power 2014-11-08 09:15:14 -05:00
video.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00