aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r--arch/x86/oprofile/backtrace.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
index dc59a808009f..0ed046a187f7 100644
--- a/arch/x86/oprofile/backtrace.c
+++ b/arch/x86/oprofile/backtrace.c
@@ -76,16 +76,8 @@ dump_user_backtrace(struct frame_head * head)
76void 76void
77x86_backtrace(struct pt_regs * const regs, unsigned int depth) 77x86_backtrace(struct pt_regs * const regs, unsigned int depth)
78{ 78{
79 struct frame_head *head; 79 struct frame_head *head = (struct frame_head *)frame_pointer(regs);
80 unsigned long stack; 80 unsigned long stack = stack_pointer(regs);
81
82#ifdef CONFIG_X86_64
83 head = (struct frame_head *)regs->rbp;
84 stack = regs->rsp;
85#else
86 head = (struct frame_head *)regs->ebp;
87 stack = regs->esp;
88#endif
89 81
90 if (!user_mode_vm(regs)) { 82 if (!user_mode_vm(regs)) {
91 if (depth) 83 if (depth)