Merge branches 'cleanup', 'fixes', 'misc', 'omap-barrier' and 'uaccess' into for...
[linux-2.6-microblaze.git] / arch / arm / kernel / smp.c
index 90dfbed..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();
 
@@ -578,7 +591,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
        struct pt_regs *old_regs = set_irq_regs(regs);
 
        if ((unsigned)ipinr < NR_IPI) {
-               trace_ipi_entry(ipi_types[ipinr]);
+               trace_ipi_entry_rcuidle(ipi_types[ipinr]);
                __inc_irq_stat(cpu, ipi_irqs[ipinr]);
        }
 
@@ -637,7 +650,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
        }
 
        if ((unsigned)ipinr < NR_IPI)
-               trace_ipi_exit(ipi_types[ipinr]);
+               trace_ipi_exit_rcuidle(ipi_types[ipinr]);
        set_irq_regs(old_regs);
 }