Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759999Ab3DDKmr (ORCPT ); Thu, 4 Apr 2013 06:42:47 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:46487 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759974Ab3DDKmp (ORCPT ); Thu, 4 Apr 2013 06:42:45 -0400 X-AuditID: 85900ec0-d2ec7b900000151e-1a-515d5922deb6 Subject: [PATCH -tip ] kprobes: Move __kprobes definition into compiler.h To: Ingo Molnar , linux-kernel@vger.kernel.org From: Masami Hiramatsu Cc: Timo Juhani Lindfors , Ananth N Mavinakayanahalli , Pavel Emelyanov , Jiri Kosina , Ingo Molnar , Nadia Yvette Chambers , yrl.pp-manager.tt@hitachi.com, "David S. Miller" Date: Thu, 04 Apr 2013 19:40:50 +0900 Message-ID: <20130404104049.21071.20908.stgit@mhiramat-M0-7522> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2361 Lines: 70 Currently, __kprobes is defined in linux/kprobes.h which is too big to be included in small or basic headers only for using this attribute. This moves __kprobes definition into linux/compiler.h in which other compiler attributes are defined. Signed-off-by: Masami Hiramatsu Cc: Timo Juhani Lindfors Cc: Ananth N Mavinakayanahalli Cc: "David S. Miller" Cc: Nadia Yvette Chambers Cc: Pavel Emelyanov Cc: Jiri Kosina Cc: Ingo Molnar --- include/linux/compiler.h | 6 ++++++ include/linux/kprobes.h | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 10b8f23..9382db2 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -351,4 +351,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); */ #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) +#ifdef CONFIG_KPROBES +/* Attach to insert probes on any functions which should be ignored */ +#define __kprobes __attribute__((__section__(".kprobes.text"))) +#else +#define __kprobes +#endif #endif /* __LINUX_COMPILER_H */ diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 4b6ef4d..ca1d27a 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -29,6 +29,7 @@ * and Prasanna S Panchamukhi * added function-return probes. */ +#include /* for __kprobes */ #include #include #include @@ -49,16 +50,11 @@ #define KPROBE_REENTER 0x00000004 #define KPROBE_HIT_SSDONE 0x00000008 -/* Attach to insert probes on any functions which should be ignored*/ -#define __kprobes __attribute__((__section__(".kprobes.text"))) - #else /* CONFIG_KPROBES */ typedef int kprobe_opcode_t; struct arch_specific_insn { int dummy; }; -#define __kprobes - #endif /* CONFIG_KPROBES */ struct kprobe; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/