diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2013-04-04 06:40:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-04-08 11:28:34 -0400 |
commit | 324670b620ab1ed00ba160e435686bd2ae4a59ce (patch) | |
tree | 176c0f872668097350fa6c38cddd884088862ce6 /include/linux/compiler.h | |
parent | cc2f5a8adbc7ab1fdb7d9bcf4ea9838c73e82dfe (diff) |
kprobes: Move __kprobes definition into compiler.h
Currently, __kprobes is defined in linux/kprobes.h which
is too big to be included in small or basic headers
that want to make use of this simple attribute.
So move __kprobes definition into linux/compiler.h
in which other compiler attributes are defined.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
Cc: yrl.pp-manager.tt@hitachi.com
Cc: David S. Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20130404104049.21071.20908.stgit@mhiramat-M0-7522
[ Improved the attribute explanation a bit. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r-- | include/linux/compiler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 10b8f23fab0f..92669cd182a6 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); | |||
351 | */ | 351 | */ |
352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | 352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) |
353 | 353 | ||
354 | /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ | ||
355 | #ifdef CONFIG_KPROBES | ||
356 | # define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
357 | #else | ||
358 | # define __kprobes | ||
359 | #endif | ||
354 | #endif /* __LINUX_COMPILER_H */ | 360 | #endif /* __LINUX_COMPILER_H */ |