aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/time_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/time_64.c')
-rw-r--r--arch/x86/kernel/time_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c
index e3d49c553af2..7fd995edb762 100644
--- a/arch/x86/kernel/time_64.c
+++ b/arch/x86/kernel/time_64.c
@@ -34,11 +34,15 @@ unsigned long profile_pc(struct pt_regs *regs)
34 of flags from PUSHF 34 of flags from PUSHF
35 Eflags always has bits 22 and up cleared unlike kernel addresses. */ 35 Eflags always has bits 22 and up cleared unlike kernel addresses. */
36 if (!user_mode(regs) && in_lock_functions(pc)) { 36 if (!user_mode(regs) && in_lock_functions(pc)) {
37#ifdef CONFIG_FRAME_POINTER
38 return *(unsigned long *)(regs->bp + sizeof(long));
39#else
37 unsigned long *sp = (unsigned long *)regs->sp; 40 unsigned long *sp = (unsigned long *)regs->sp;
38 if (sp[0] >> 22) 41 if (sp[0] >> 22)
39 return sp[0]; 42 return sp[0];
40 if (sp[1] >> 22) 43 if (sp[1] >> 22)
41 return sp[1]; 44 return sp[1];
45#endif
42 } 46 }
43 return pc; 47 return pc;
44} 48}