From 7eed2e09abf0a0064a7e3f4a911b37d71202dfa4 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 24 Nov 2014 14:30:32 +0100 Subject: s390/ftrace: provide working ftrace_return_address() 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 Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/ftrace.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/s390/include/asm/ftrace.h') diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index 785041f1dc77..abb618f1ead2 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h @@ -8,6 +8,8 @@ #ifndef __ASSEMBLY__ +#define ftrace_return_address(n) __builtin_return_address(n) + void _mcount(void); void ftrace_caller(void); -- cgit v1.2.3-59-g8ed1b