aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/ftrace.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-04-08 23:26:23 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-11 13:37:29 +0200
commit6e042492a272bdc507d37982b890dc5266d5bb01 (patch)
treed52308a0bac1805613d6e0dec3fc60263b0db005 /arch/s390/include/asm/ftrace.h
parents390: Convert IS_ENABLED uses to __is_defined (diff)
downloadlinux-dev-6e042492a272bdc507d37982b890dc5266d5bb01.tar.xz
linux-dev-6e042492a272bdc507d37982b890dc5266d5bb01.zip
s390: avoid __builtin_return_address(n) on clang
llvm on s390 has problems with __builtin_return_address(n), with n>0, this results in a somewhat cryptic error message: fatal error: error in backend: Unsupported stack frame traversal count To work around it, use the direct return address directly. This is probably not ideal here, but gets things to compile and should only lead to inferior reporting, not to misbehavior of the generated code. Link: https://bugs.llvm.org/show_bug.cgi?id=41424 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to '')
-rw-r--r--arch/s390/include/asm/ftrace.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h
index 5a3c95b11952..6e0ed0338785 100644
--- a/arch/s390/include/asm/ftrace.h
+++ b/arch/s390/include/asm/ftrace.h
@@ -13,7 +13,12 @@
#ifndef __ASSEMBLY__
+#ifdef CONFIG_CC_IS_CLANG
+/* https://bugs.llvm.org/show_bug.cgi?id=41424 */
+#define ftrace_return_address(n) 0UL
+#else
#define ftrace_return_address(n) __builtin_return_address(n)
+#endif
void _mcount(void);
void ftrace_caller(void);