Commit c3892c11 authored by Zwane Mwaikambo's avatar Zwane Mwaikambo Committed by Linus Torvalds

[PATCH] out-of-line locks / ppc32

Signed-off-by: default avatarZwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4c9ed171
...@@ -108,6 +108,20 @@ static inline int tb_delta(unsigned *jiffy_stamp) { ...@@ -108,6 +108,20 @@ static inline int tb_delta(unsigned *jiffy_stamp) {
return delta; 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, * timer_interrupt - gets called when the decrementer overflows,
* with interrupts disabled. * with interrupts disabled.
......
...@@ -32,6 +32,7 @@ SECTIONS ...@@ -32,6 +32,7 @@ SECTIONS
{ {
*(.text) *(.text)
SCHED_TEXT SCHED_TEXT
LOCK_TEXT
*(.fixup) *(.fixup)
*(.got1) *(.got1)
__got2_start = .; __got2_start = .;
......
...@@ -47,7 +47,12 @@ struct pt_regs { ...@@ -47,7 +47,12 @@ struct pt_regs {
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#define instruction_pointer(regs) ((regs)->nip) #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) #define profile_pc(regs) instruction_pointer(regs)
#endif
#define user_mode(regs) (((regs)->msr & MSR_PR) != 0) #define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
#define force_successful_syscall_return() \ #define force_successful_syscall_return() \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment