summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/smp.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-23 02:25:38 +0000
commit16b5d462f73eb29d1f67fa01cc1ea66afdc72569 (patch)
tree5407bd573f4840e473ea27cbe61e5c7a07131fcd /arch/sparc64/kernel/smp.c
parentce8a076e11e7e5ee36007f9a3eee5bb3744cb8f6 (diff)
Merge with Linux 2.3.99-pre2.
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r--arch/sparc64/kernel/smp.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index b4ee5625e..0d5f615cf 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -528,7 +528,7 @@ static unsigned long penguins_are_doing_time = 0;
void smp_capture(void)
{
if (smp_processors_ready) {
- int result = atomic_add_return(1, &smp_capture_depth);
+ int result = __atomic_add(1, &smp_capture_depth);
membar("#StoreStore | #LoadStore");
if(result == 1) {
@@ -596,18 +596,21 @@ void smp_promstop_others(void)
smp_cross_call(&xcall_promstop, 0, 0, 0);
}
-static inline void sparc64_do_profile(unsigned long pc, unsigned long g3)
+static inline void sparc64_do_profile(unsigned long pc, unsigned long o7)
{
if (prof_buffer && current->pid) {
extern int _stext;
extern int rwlock_impl_begin, rwlock_impl_end;
extern int atomic_impl_begin, atomic_impl_end;
+ extern int __memcpy_begin, __memcpy_end;
- if ((pc >= (unsigned long) &rwlock_impl_begin &&
+ if ((pc >= (unsigned long) &atomic_impl_begin &&
+ pc < (unsigned long) &atomic_impl_end) ||
+ (pc >= (unsigned long) &rwlock_impl_begin &&
pc < (unsigned long) &rwlock_impl_end) ||
- (pc >= (unsigned long) &atomic_impl_begin &&
- pc < (unsigned long) &atomic_impl_end))
- pc = g3;
+ (pc >= (unsigned long) &__memcpy_begin &&
+ pc < (unsigned long) &__memcpy_end))
+ pc = o7;
pc -= (unsigned long) &_stext;
pc >>= prof_shift;
@@ -646,7 +649,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
clear_softint((1UL << 0));
do {
if(!user)
- sparc64_do_profile(regs->tpc, regs->u_regs[UREG_G3]);
+ sparc64_do_profile(regs->tpc, regs->u_regs[UREG_RETPC]);
if(!--prof_counter(cpu))
{
if (cpu == boot_cpu_id) {