aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/oprofile/backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/oprofile/backtrace.c')
-rw-r--r--arch/s390/oprofile/backtrace.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/oprofile/backtrace.c b/arch/s390/oprofile/backtrace.c
index fe0bfe370c45..1884e1759529 100644
--- a/arch/s390/oprofile/backtrace.c
+++ b/arch/s390/oprofile/backtrace.c
@@ -54,12 +54,13 @@ __show_trace(unsigned int *depth, unsigned long sp,
54 54
55void s390_backtrace(struct pt_regs * const regs, unsigned int depth) 55void s390_backtrace(struct pt_regs * const regs, unsigned int depth)
56{ 56{
57 unsigned long head; 57 unsigned long head, frame_size;
58 struct stack_frame* head_sf; 58 struct stack_frame* head_sf;
59 59
60 if (user_mode(regs)) 60 if (user_mode(regs))
61 return; 61 return;
62 62
63 frame_size = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs);
63 head = regs->gprs[15]; 64 head = regs->gprs[15];
64 head_sf = (struct stack_frame*)head; 65 head_sf = (struct stack_frame*)head;
65 66
@@ -68,8 +69,9 @@ void s390_backtrace(struct pt_regs * const regs, unsigned int depth)
68 69
69 head = head_sf->back_chain; 70 head = head_sf->back_chain;
70 71
71 head = __show_trace(&depth, head, S390_lowcore.async_stack - ASYNC_SIZE, 72 head = __show_trace(&depth, head,
72 S390_lowcore.async_stack); 73 S390_lowcore.async_stack + frame_size - ASYNC_SIZE,
74 S390_lowcore.async_stack + frame_size);
73 75
74 __show_trace(&depth, head, S390_lowcore.thread_info, 76 __show_trace(&depth, head, S390_lowcore.thread_info,
75 S390_lowcore.thread_info + THREAD_SIZE); 77 S390_lowcore.thread_info + THREAD_SIZE);