Files
linux/Documentation
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
..
2015-07-17 16:39:53 -07:00
2014-05-05 15:32:05 +02:00
2014-02-28 15:12:08 -08:00
2014-02-10 16:01:40 -08:00
2015-06-08 16:43:09 -06:00
2014-12-10 17:41:10 -08:00
2015-06-08 23:15:45 +02:00
2015-06-26 11:23:38 -04:00
2015-06-22 09:59:28 -06:00
2015-05-13 15:39:04 -04:00
2015-06-25 17:00:37 -07:00
2015-07-02 11:08:50 +02:00
2015-02-27 11:44:24 -08:00
2015-05-29 17:21:45 -05:00
2014-05-05 15:32:05 +02:00
2015-06-24 18:17:40 +02:00
2013-12-02 14:48:28 +01:00
2014-12-08 09:07:11 -05:00
2015-06-23 06:49:44 -06:00
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-09-23 23:44:16 -07:00