Skip to content

Commit

Permalink
s390/ftrace: provide working ftrace_return_address()
Browse files Browse the repository at this point in the history
The common code ftrace_return_address(n), which is just a wrapper for
__builtin_return_address(n), will only work for n > 0 if CONFIG_FRAME_POINTER
is set to 'y'. Otherwise it will return 0.
Since on s390 we will never have that config option set to 'y'
ftrace_return_address() won't work at all for n > 0.

Luckily we always compile the kernel with -mkernel-backchain which
in turn means that __builtin_return_address(n) will always work.

So let ftrace_return_address(n) map to __builtin_return_address(n).

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 Nov 28, 2014
1 parent b3e06dc commit 7eed2e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#ifndef __ASSEMBLY__

#define ftrace_return_address(n) __builtin_return_address(n)

void _mcount(void);
void ftrace_caller(void);

Expand Down

0 comments on commit 7eed2e0

Please sign in to comment.