git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sparc
/
kernel
/
sun4m_smp.c
diff --git
a/arch/sparc/kernel/sun4m_smp.c
b/arch/sparc/kernel/sun4m_smp.c
index
70b375a
..
e2d9c01
100644
(file)
--- a/
arch/sparc/kernel/sun4m_smp.c
+++ b/
arch/sparc/kernel/sun4m_smp.c
@@
-19,6
+19,7
@@
#include <linux/profile.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#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>
#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 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;
extern volatile unsigned long cpu_callin_map[NR_CPUS];
extern unsigned char boot_cpu_id;
@@
-66,7
+66,7
@@
static inline unsigned long swap(volatile unsigned long *ptr, unsigned long val)
static void smp_setup_percpu_timer(void);
extern void cpu_probe(void);
static void smp_setup_percpu_timer(void);
extern void cpu_probe(void);
-void __init smp4m_callin(void)
+void __
cpu
init smp4m_callin(void)
{
int cpuid = hard_smp_processor_id();
{
int cpuid = hard_smp_processor_id();
@@
-112,13
+112,8
@@
void __init smp4m_callin(void)
local_irq_enable();
cpu_set(cpuid, cpu_online_map);
local_irq_enable();
cpu_set(cpuid, cpu_online_map);
- /* last one in gets all the interrupts (for testing) */
- set_irq_udt(boot_cpu_id);
}
}
-extern void init_IRQ(void);
-extern void cpu_panic(void);
-
/*
* Cycle through the processors asking the PROM to start each one.
*/
/*
* Cycle through the processors asking the PROM to start each one.
*/
@@
-134,7
+129,7
@@
void __init smp4m_boot_cpus(void)
local_flush_cache_all();
}
local_flush_cache_all();
}
-int smp4m_boot_one_cpu(int i)
+int
__cpuinit
smp4m_boot_one_cpu(int i)
{
extern unsigned long sun4m_cpu_startup;
unsigned long *entry = &sun4m_cpu_startup;
{
extern unsigned long sun4m_cpu_startup;
unsigned long *entry = &sun4m_cpu_startup;
@@
-222,7
+217,6
@@
void __init smp4m_smp_done(void)
}
/* Ok, they are spinning and ready to go. */
}
/* Ok, they are spinning and ready to go. */
- smp_processors_ready = 1;
}
/* At each hardware IRQ, we get this called to forward IRQ reception
}
/* At each hardware IRQ, we get this called to forward IRQ reception
@@
-360,11
+354,14
@@
void smp4m_cross_call_irq(void)
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
{
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
{
+ struct pt_regs *old_regs;
int cpu = smp_processor_id();
int cpu = smp_processor_id();
+ old_regs = set_irq_regs(regs);
+
clear_profile_irq(cpu);
clear_profile_irq(cpu);
- profile_tick(CPU_PROFILING
, regs
);
+ profile_tick(CPU_PROFILING);
if(!--prof_counter(cpu)) {
int user = user_mode(regs);
if(!--prof_counter(cpu)) {
int user = user_mode(regs);
@@
-375,6
+372,7
@@
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
prof_counter(cpu) = prof_multiplier(cpu);
}
prof_counter(cpu) = prof_multiplier(cpu);
}
+ set_irq_regs(old_regs);
}
extern unsigned int lvl14_resolution;
}
extern unsigned int lvl14_resolution;