From: Heiko Carstens Date: Sun, 18 Jan 2015 15:45:42 +0000 (+0100) Subject: ftrace: let notrace function attribute disable hotpatching if necessary X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=61f552141c9c0e88b3fdc7046265781ffd8fa68a;p=deliverable%2Flinux.git 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 Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- 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 *); #include #endif +#ifdef CC_USING_HOTPATCH +#define notrace __attribute__((hotpatch(0,0))) +#else #define notrace __attribute__((no_instrument_function)) +#endif /* Intel compiler defines __GNUC__. So we will overwrite implementations * coming from above header files here