Merge branches 'cleanup', 'fixes', 'misc', 'omap-barrier' and 'uaccess' into for...
[linux-2.6-microblaze.git] / arch / arm / kernel / smp.c
index 3d6b782..ba0063c 100644 (file)
@@ -175,13 +175,26 @@ static int platform_cpu_disable(unsigned int cpu)
        if (smp_ops.cpu_disable)
                return smp_ops.cpu_disable(cpu);
 
+       return 0;
+}
+
+int platform_can_hotplug_cpu(unsigned int cpu)
+{
+       /* cpu_die must be specified to support hotplug */
+       if (!smp_ops.cpu_die)
+               return 0;
+
+       if (smp_ops.cpu_can_disable)
+               return smp_ops.cpu_can_disable(cpu);
+
        /*
         * By default, allow disabling all CPUs except the first one,
         * since this is special on a lot of platforms, e.g. because
         * of clock tick interrupts.
         */
-       return cpu == 0 ? -EPERM : 0;
+       return cpu != 0;
 }
+
 /*
  * __cpu_disable runs on the processor to be shutdown.
  */
@@ -253,7 +266,7 @@ void __cpu_die(unsigned int cpu)
  * of the other hotplug-cpu capable cores, so presumably coming
  * out of idle fixes this.
  */
-void __ref cpu_die(void)
+void arch_cpu_idle_dead(void)
 {
        unsigned int cpu = smp_processor_id();