aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/time_32.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-21 07:24:08 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-31 03:35:46 -0400
commitef4512882dbe9978e7a18ccbcb4cb45705ce5560 (patch)
tree7a9f85a9a9ddb4be1a0073730bf04ca25bc1eb4f /arch/x86/kernel/time_32.c
parent08047c4f1740c7cee75d58e2919d48c09f951649 (diff)
x86: time_32/64.c unify profile_pc
The code is identical except for the formatting and a useless #ifdef. Make it the same. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/time_32.c')
-rw-r--r--arch/x86/kernel/time_32.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c
index fd876cc77487..fda0c34da757 100644
--- a/arch/x86/kernel/time_32.c
+++ b/arch/x86/kernel/time_32.c
@@ -34,23 +34,22 @@ unsigned long profile_pc(struct pt_regs *regs)
34{ 34{
35 unsigned long pc = instruction_pointer(regs); 35 unsigned long pc = instruction_pointer(regs);
36 36
37#ifdef CONFIG_SMP
38 if (!user_mode_vm(regs) && in_lock_functions(pc)) { 37 if (!user_mode_vm(regs) && in_lock_functions(pc)) {
39#ifdef CONFIG_FRAME_POINTER 38#ifdef CONFIG_FRAME_POINTER
40 return *(unsigned long *)(regs->bp + sizeof(long)); 39 return *(unsigned long *)(regs->bp + sizeof(long));
41#else 40#else
42 unsigned long *sp = (unsigned long *)&regs->sp; 41 unsigned long *sp = (unsigned long *)regs->sp;
43 42 /*
44 /* Return address is either directly at stack pointer 43 * Return address is either directly at stack pointer
45 or above a saved flags. Eflags has bits 22-31 zero, 44 * or above a saved flags. Eflags has bits 22-31 zero,
46 kernel addresses don't. */ 45 * kernel addresses don't.
46 */
47 if (sp[0] >> 22) 47 if (sp[0] >> 22)
48 return sp[0]; 48 return sp[0];
49 if (sp[1] >> 22) 49 if (sp[1] >> 22)
50 return sp[1]; 50 return sp[1];
51#endif 51#endif
52 } 52 }
53#endif
54 return pc; 53 return pc;
55} 54}
56EXPORT_SYMBOL(profile_pc); 55EXPORT_SYMBOL(profile_pc);