s390/ftrace: provide working ftrace_return_address()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 24 Nov 2014 13:30:32 +0000 (14:30 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 28 Nov 2014 08:47:15 +0000 (09:47 +0100)
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>
arch/s390/include/asm/ftrace.h

index 785041f1dc77bb623913c522b5c50d1b5f57b184..abb618f1ead25fcad51b90bc1cffd61ef8dde67b 100644 (file)
@@ -8,6 +8,8 @@
 
 #ifndef __ASSEMBLY__
 
+#define ftrace_return_address(n) __builtin_return_address(n)
+
 void _mcount(void);
 void ftrace_caller(void);
 
This page took 0.02811 seconds and 5 git commands to generate.