KVM: MMU: invalidate and flush on spte small->large page size change
[safe/jmp/linux-2.6] / kernel / stop_machine.c
index 884c7a1..70f8d90 100644 (file)
@@ -294,14 +294,13 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
        struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
        unsigned int cpu = (unsigned long)hcpu;
        struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
-       struct cpu_stop_work *work;
        struct task_struct *p;
 
        switch (action & ~CPU_TASKS_FROZEN) {
        case CPU_UP_PREPARE:
                BUG_ON(stopper->thread || stopper->enabled ||
                       !list_empty(&stopper->works));
-               p = kthread_create(cpu_stopper_thread, stopper, "stopper/%d",
+               p = kthread_create(cpu_stopper_thread, stopper, "migration/%d",
                                   cpu);
                if (IS_ERR(p))
                        return NOTIFY_BAD;
@@ -322,7 +321,10 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
 
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
-       case CPU_DEAD:
+       case CPU_POST_DEAD:
+       {
+               struct cpu_stop_work *work;
+
                /* kill the stopper */
                kthread_stop(stopper->thread);
                /* drain remaining works */
@@ -335,6 +337,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
                put_task_struct(stopper->thread);
                stopper->thread = NULL;
                break;
+       }
 #endif
        }
 
@@ -375,6 +378,8 @@ static int __init cpu_stop_init(void)
 }
 early_initcall(cpu_stop_init);
 
+#ifdef CONFIG_STOP_MACHINE
+
 /* This controls the threads on each CPU. */
 enum stopmachine_state {
        /* Dummy starting state for thread. */
@@ -477,3 +482,5 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)
        return ret;
 }
 EXPORT_SYMBOL_GPL(stop_machine);
+
+#endif /* CONFIG_STOP_MACHINE */