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) {
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.
......
......@@ -32,6 +32,7 @@ SECTIONS
{
*(.text)
SCHED_TEXT
LOCK_TEXT
*(.fixup)
*(.got1)
__got2_start = .;
......
......@@ -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() \
......
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