|
@@ -17,6 +17,8 @@
|
|
#include <linux/gfp.h>
|
|
#include <linux/gfp.h>
|
|
#include <linux/suspend.h>
|
|
#include <linux/suspend.h>
|
|
|
|
|
|
|
|
+#include "smpboot.h"
|
|
|
|
+
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
|
|
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
|
|
static DEFINE_MUTEX(cpu_add_remove_lock);
|
|
static DEFINE_MUTEX(cpu_add_remove_lock);
|
|
@@ -300,6 +302,11 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
cpu_hotplug_begin();
|
|
cpu_hotplug_begin();
|
|
|
|
+
|
|
|
|
+ ret = smpboot_prepare(cpu);
|
|
|
|
+ if (ret)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
|
|
ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
|
|
if (ret) {
|
|
if (ret) {
|
|
nr_calls--;
|
|
nr_calls--;
|
|
@@ -320,6 +327,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
|
|
out_notify:
|
|
out_notify:
|
|
if (ret != 0)
|
|
if (ret != 0)
|
|
__cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
|
|
__cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
|
|
|
|
+out:
|
|
cpu_hotplug_done();
|
|
cpu_hotplug_done();
|
|
|
|
|
|
return ret;
|
|
return ret;
|