From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932AbbAZMzJ (ORCPT ); Mon, 26 Jan 2015 07:55:09 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:53792 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753447AbbAZMzD (ORCPT ); Mon, 26 Jan 2015 07:55:03 -0500 From: Heiko Carstens To: Steven Rostedt , Masami Hiramatsu Cc: Vojtech Pavlik , Jiri Kosina , Jiri Slaby , Andreas Krebbel , Dominik Vogt , Martin Schwidefsky , linux-kernel@vger.kernel.org, Heiko Carstens Subject: [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute Date: Mon, 26 Jan 2015 13:54:53 +0100 Message-Id: <1422276894-31302-3-git-send-email-heiko.carstens@de.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422276894-31302-1-git-send-email-heiko.carstens@de.ibm.com> References: <1422276894-31302-1-git-send-email-heiko.carstens@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15012612-0013-0000-0000-000002BF25FC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 that shall be filled with nops for runtime patching. s390 will use the hotpatch attribute for function tracing, therefore introduce a nohotpatch define, depending on CC_USING_HOTPATCH, and add it to the existing notrace define. Signed-off-by: Heiko Carstens --- include/linux/compiler.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index b4fd7013c9f4..b4ab98e0e10b 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -54,7 +54,13 @@ extern void __chk_io_ptr(const volatile void __iomem *); #include #endif -#define notrace __attribute__((no_instrument_function)) +#ifdef CC_USING_HOTPATCH +#define nohotpatch __attribute__((hotpatch(0,0))) +#else +#define nohotpatch +#endif + +#define notrace __attribute__((no_instrument_function)) nohotpatch /* Intel compiler defines __GNUC__. So we will overwrite implementations * coming from above header files here -- 2.1.4