patch-2.3.99-pre6 linux/arch/sparc/kernel/sun4m_smp.c
Next file: linux/arch/sparc/kernel/sys_solaris.c
Previous file: linux/arch/sparc/kernel/sun4d_smp.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Fri Apr 14 09:37:09 2000
- Orig file:
v2.3.99-pre5/linux/arch/sparc/kernel/sun4m_smp.c
- Orig date:
Fri Jan 28 15:09:07 2000
diff -u --recursive --new-file v2.3.99-pre5/linux/arch/sparc/kernel/sun4m_smp.c linux/arch/sparc/kernel/sun4m_smp.c
@@ -440,27 +440,6 @@
ccall_info.processors_out[i] = 1;
}
-/* Protects counters touched during level14 ticker */
-static spinlock_t ticker_lock = SPIN_LOCK_UNLOCKED;
-
-/* 32-bit Sparc specific profiling function. */
-static inline void sparc_do_profile(unsigned long pc)
-{
- if(prof_buffer && current->pid) {
- extern int _stext;
-
- pc -= (unsigned long) &_stext;
- pc >>= prof_shift;
-
- spin_lock(&ticker_lock);
- if(pc < prof_len)
- prof_buffer[pc]++;
- else
- prof_buffer[prof_len - 1]++;
- spin_unlock(&ticker_lock);
- }
-}
-
extern unsigned int prof_multiplier[NR_CPUS];
extern unsigned int prof_counter[NR_CPUS];
@@ -468,6 +447,8 @@
unsigned long user, unsigned long system,
int cpu);
+extern void sparc_do_profile(unsigned long pc, unsigned long o7);
+
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
{
int cpu = smp_processor_id();
@@ -475,7 +456,7 @@
clear_profile_irq(mid_xlate[cpu]);
if(!user_mode(regs))
- sparc_do_profile(regs->pc);
+ sparc_do_profile(regs->pc, regs->u_regs[UREG_RETPC]);
if(!--prof_counter[cpu]) {
int user = user_mode(regs);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)