diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-01-18 10:45:42 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-01-29 03:19:23 -0500 |
commit | 61f552141c9c0e88b3fdc7046265781ffd8fa68a (patch) | |
tree | 0a659126e4c54bd63a6a86ebb6de8bfabc8ceff8 /include/linux/compiler.h | |
parent | c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 (diff) |
ftrace: let notrace function attribute disable hotpatching if necessary
gcc supports an s390 specific function attribute called "hotpatch".
It can be used to specify the number of halfwords that shall be added before
and after a function and which shall be filled with nops for runtime patching.
s390 will use the hotpatch attribute for function tracing, therefore make
sure that the notrace function attribute either disables the mcount call
or in case of hotpatch nop generation.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r-- | include/linux/compiler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index d5ad7b1118fc..1ef679f4b88e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -54,7 +54,11 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
54 | #include <linux/compiler-gcc.h> | 54 | #include <linux/compiler-gcc.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef CC_USING_HOTPATCH | ||
58 | #define notrace __attribute__((hotpatch(0,0))) | ||
59 | #else | ||
57 | #define notrace __attribute__((no_instrument_function)) | 60 | #define notrace __attribute__((no_instrument_function)) |
61 | #endif | ||
58 | 62 | ||
59 | /* Intel compiler defines __GNUC__. So we will overwrite implementations | 63 | /* Intel compiler defines __GNUC__. So we will overwrite implementations |
60 | * coming from above header files here | 64 | * coming from above header files here |