diff options
| author | Zwane Mwaikambo <zwane@linuxpower.ca> | 2004-09-04 02:19:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-04 02:19:10 -0700 |
| commit | c3892c11104fc6c0d1c847ddefd75c8168b7c90a (patch) | |
| tree | 78f3c2128b43aec107416edffb059876330c0666 | |
| parent | 4c9ed1710d1835a05bbf13c54f8ea955688d0802 (diff) | |
[PATCH] out-of-line locks / ppc32
Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/ppc/kernel/time.c | 14 | ||||
| -rw-r--r-- | arch/ppc/kernel/vmlinux.lds.S | 1 | ||||
| -rw-r--r-- | include/asm-ppc/ptrace.h | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index 1913ef299aae..924c594e5775 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c @@ -108,6 +108,20 @@ static inline int tb_delta(unsigned *jiffy_stamp) { return delta; } +#ifdef CONFIG_SMP +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= (unsigned long)&__lock_text_start && + pc <= (unsigned long)&__lock_text_end) + return regs->link; + + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif + /* * timer_interrupt - gets called when the decrementer overflows, * with interrupts disabled. diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S index 66e513a4f972..5d2cbc7807f8 100644 --- a/arch/ppc/kernel/vmlinux.lds.S +++ b/arch/ppc/kernel/vmlinux.lds.S @@ -32,6 +32,7 @@ SECTIONS { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.got1) __got2_start = .; diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h index 3e5920032fc3..9d4e4ea530c3 100644 --- a/include/asm-ppc/ptrace.h +++ b/include/asm-ppc/ptrace.h @@ -47,7 +47,12 @@ struct pt_regs { #ifndef __ASSEMBLY__ #define instruction_pointer(regs) ((regs)->nip) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *regs); +#else #define profile_pc(regs) instruction_pointer(regs) +#endif + #define user_mode(regs) (((regs)->msr & MSR_PR) != 0) #define force_successful_syscall_return() \ |
