]> err.no Git - linux-2.6/blobdiff - arch/sparc/kernel/sun4m_smp.c
[ARM] 4652/1: pxa: fix a typo of pxa27x usb host clk definition
[linux-2.6] / arch / sparc / kernel / sun4m_smp.c
index 3b32096134aa20067c10dc9b404933f696b1a618..730eb5796f8edb98b83332e4a9099996ca1e3083 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/sched.h>
 #include <linux/threads.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
@@ -19,6 +18,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>
@@ -31,6 +31,8 @@
 #include <asm/oplib.h>
 #include <asm/cpudata.h>
 
+#include "irq.h"
+
 #define IRQ_RESCHEDULE         13
 #define IRQ_STOP_CPU           14
 #define IRQ_CROSS_CALL         15
@@ -39,7 +41,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 +218,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 +355,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 +373,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;
@@ -402,7 +406,7 @@ void __init smp4m_blackbox_current(unsigned *addr)
        
        addr[0] = 0x81580000 | rd;              /* rd %tbr, reg */
        addr[2] = 0x8130200a | rd | rs1;        /* srl reg, 0xa, reg */
-       addr[4] = 0x8008200c | rd | rs1;        /* and reg, 3, reg */
+       addr[4] = 0x8008200c | rd | rs1;        /* and reg, 0xc, reg */
 }
 
 void __init sun4m_init_smp(void)