- patches.fixes/patch-2.6.11-rc1: 2.6.11-rc1.
[linux-flexiantxendom0-3.2.10.git] / arch / ppc64 / kernel / smp.c
index a46c63b..f5b4a8f 100644 (file)
@@ -22,9 +22,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
-#include <asm/naca.h>
 #include <asm/paca.h>
 #include <asm/time.h>
-#include <asm/ppcdebug.h>
 #include <asm/machdep.h>
 #include <asm/cputable.h>
 #include <asm/system.h>
@@ -59,7 +54,6 @@
 #endif
 
 int smp_threads_ready;
-unsigned long cache_decay_ticks;
 
 cpumask_t cpu_possible_map = CPU_MASK_NONE;
 cpumask_t cpu_online_map = CPU_MASK_NONE;
@@ -74,15 +68,10 @@ static volatile unsigned int cpu_callin_map[NR_CPUS];
 
 extern unsigned char stab_array[];
 
-extern int cpu_idle(void *unused);
 void smp_call_function_interrupt(void);
 
 int smt_enabled_at_boot = 1;
 
-/* Low level assembly function used to backup CPU 0 state */
-extern void __save_cpu_setup(void);
-
-
 #ifdef CONFIG_PPC_MULTIPLATFORM
 void smp_mpic_message_pass(int target, int msg)
 {
@@ -157,11 +146,6 @@ static void __init smp_space_timers(unsigned int max_cpus)
        }
 }
 
-void smp_local_timer_interrupt(struct pt_regs * regs)
-{
-       update_process_times(user_mode(regs));
-}
-
 void smp_message_recv(int msg, struct pt_regs *regs)
 {
        switch(msg) {
@@ -514,16 +498,14 @@ int __devinit start_secondary(void *unused)
        if (smp_ops->take_timebase)
                smp_ops->take_timebase();
 
-       if (smp_ops->late_setup_cpu)
-               smp_ops->late_setup_cpu(cpu);
-
        spin_lock(&call_lock);
        cpu_set(cpu, cpu_online_map);
        spin_unlock(&call_lock);
 
        local_irq_enable();
 
-       return cpu_idle(NULL);
+       cpu_idle();
+       return 0;
 }
 
 int setup_profiling_timer(unsigned int multiplier)
@@ -557,3 +539,19 @@ void __init smp_cpus_done(unsigned int max_cpus)
         */
        cpu_present_map = cpu_possible_map;
 }
+
+#ifdef CONFIG_HOTPLUG_CPU
+int __cpu_disable(void)
+{
+       if (smp_ops->cpu_disable)
+               return smp_ops->cpu_disable();
+
+       return -ENOSYS;
+}
+
+void __cpu_die(unsigned int cpu)
+{
+       if (smp_ops->cpu_die)
+               smp_ops->cpu_die(cpu);
+}
+#endif