Merge branch 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl...
[powerpc.git] / arch / sparc / kernel / sun4m_smp.c
index 3b32096..e2d9c01 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/profile.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
+#include <asm/irq_regs.h>
 
 #include <asm/ptrace.h>
 #include <asm/atomic.h>
@@ -39,7 +40,6 @@ extern ctxd_t *srmmu_ctx_table_phys;
 
 extern void calibrate_delay(void);
 
-extern volatile int smp_processors_ready;
 extern volatile unsigned long cpu_callin_map[NR_CPUS];
 extern unsigned char boot_cpu_id;
 
@@ -217,7 +217,6 @@ void __init smp4m_smp_done(void)
        }
 
        /* Ok, they are spinning and ready to go. */
-       smp_processors_ready = 1;
 }
 
 /* At each hardware IRQ, we get this called to forward IRQ reception
@@ -355,11 +354,14 @@ void smp4m_cross_call_irq(void)
 
 void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
 {
+       struct pt_regs *old_regs;
        int cpu = smp_processor_id();
 
+       old_regs = set_irq_regs(regs);
+
        clear_profile_irq(cpu);
 
-       profile_tick(CPU_PROFILING, regs);
+       profile_tick(CPU_PROFILING);
 
        if(!--prof_counter(cpu)) {
                int user = user_mode(regs);
@@ -370,6 +372,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
 
                prof_counter(cpu) = prof_multiplier(cpu);
        }
+       set_irq_regs(old_regs);
 }
 
 extern unsigned int lvl14_resolution;