Messages in this thread Patch in this message | | | Date | Thu, 2 Sep 2004 20:02:40 -0400 (EDT) | From | Zwane Mwaikambo <> | Subject | [PATCH][4/8] Arch agnostic completely out of line locks / ppc32 |
| |
arch/ppc/kernel/time.c | 14 ++++++++++++++ arch/ppc/kernel/vmlinux.lds.S | 1 + include/asm-ppc/ptrace.h | 5 +++++ 3 files changed, 20 insertions(+)
Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Index: linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/time.c =================================================================== RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/arch/ppc/kernel/time.c,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 time.c --- linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/time.c 26 Aug 2004 13:12:55 -0000 1.1.1.1 +++ linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/time.c 2 Sep 2004 13:53:46 -0000 @@ -108,6 +108,20 @@ static inline int tb_delta(unsigned *jif 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. Index: linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/vmlinux.lds.S =================================================================== RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/arch/ppc/kernel/vmlinux.lds.S,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 vmlinux.lds.S --- linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/vmlinux.lds.S 26 Aug 2004 13:12:55 -0000 1.1.1.1 +++ linux-2.6.9-rc1-mm1-stage/arch/ppc/kernel/vmlinux.lds.S 2 Sep 2004 13:08:15 -0000 @@ -32,6 +32,7 @@ SECTIONS { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.got1) __got2_start = .; Index: linux-2.6.9-rc1-mm1-stage/include/asm-ppc/ptrace.h =================================================================== RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/include/asm-ppc/ptrace.h,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 ptrace.h --- linux-2.6.9-rc1-mm1-stage/include/asm-ppc/ptrace.h 26 Aug 2004 13:13:12 -0000 1.1.1.1 +++ linux-2.6.9-rc1-mm1-stage/include/asm-ppc/ptrace.h 2 Sep 2004 13:08:16 -0000 @@ -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() \ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |