From 00e096b045febf60efd8cfef8ae401c0bb9e1262 Mon Sep 17 00:00:00 2001 From: Randolph Chung Date: Fri, 21 Oct 2005 22:42:18 -0400 Subject: [PATCH] --- yaml --- r: 10478 b: refs/heads/master c: 5cd55b0edee7f979530c86b23728d461ddeb9f3f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/parisc/kernel/time.c | 18 ++++++++++++++++++ trunk/include/asm-parisc/ptrace.h | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a2e57e271b6a..f6cba740956e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 951a0150135c46c7791d68e0d1112900d99302d7 +refs/heads/master: 5cd55b0edee7f979530c86b23728d461ddeb9f3f diff --git a/trunk/arch/parisc/kernel/time.c b/trunk/arch/parisc/kernel/time.c index 7ff67f8e9f8c..163cdf39be20 100644 --- a/trunk/arch/parisc/kernel/time.c +++ b/trunk/arch/parisc/kernel/time.c @@ -104,6 +104,24 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } + +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (regs->gr[0] & PSW_N) + pc -= 4; + +#ifdef CONFIG_SMP + if (in_lock_functions(pc)) + pc = regs->gr[2]; +#endif + + return pc; +} +EXPORT_SYMBOL(profile_pc); + + /*** converted from ia64 ***/ /* * Return the number of micro-seconds that elapsed since the last diff --git a/trunk/include/asm-parisc/ptrace.h b/trunk/include/asm-parisc/ptrace.h index 3f428aa371a4..93f990e418f1 100644 --- a/trunk/include/asm-parisc/ptrace.h +++ b/trunk/include/asm-parisc/ptrace.h @@ -49,7 +49,7 @@ struct pt_regs { #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) #define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) -#define profile_pc(regs) instruction_pointer(regs) +unsigned long profile_pc(struct pt_regs *); extern void show_regs(struct pt_regs *); #endif