Skip to content

Commit

Permalink
[S390] ftrace/mcount: fix kernel stack backchain
Browse files Browse the repository at this point in the history
With packed stack the backchain is at a different location.
Just use __SF_BACKCHAIN as an offset to store the backchain.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Mar 18, 2009
1 parent f55d638 commit cf08734
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/s390/kernel/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
*/

#include <asm/asm-offsets.h>

#ifndef CONFIG_64BIT
.globl _mcount
_mcount:
Expand All @@ -14,7 +16,7 @@ _mcount:
ahi %r15,-96
l %r3,100(%r15)
la %r2,0(%r14)
st %r1,0(%r15)
st %r1,__SF_BACKCHAIN(%r15)
la %r3,0(%r3)
bras %r14,0f
.long ftrace_trace_function
Expand All @@ -38,7 +40,7 @@ _mcount:
stg %r14,112(%r15)
lgr %r1,%r15
aghi %r15,-160
stg %r1,0(%r15)
stg %r1,__SF_BACKCHAIN(%r15)
lgr %r2,%r14
lg %r3,168(%r15)
larl %r14,ftrace_trace_function
Expand Down

0 comments on commit cf08734

Please sign in to comment.