aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-07-25 14:26:10 -0400
committerIngo Molnar <mingo@kernel.org>2013-07-25 15:54:01 -0400
commit323f54ed0f3ce20e9946c961fc928ccdb80d9345 (patch)
tree820d00efdb5459871dc34fe20757ae3cfc42bdae /include/linux
parent87e3c8ae1c8676b9dd56b56456dafa14a4bacf97 (diff)
numa: Mark __node_set() as __always_inline
It is posible for some compilers to decide that __node_set() does not need to be made turned into an inline function. When the compiler does this on an __init function calling it on __initdata we get a section mismatch warning now. Use __always_inline to ensure that we will be inlined. Reported-by: Paul Bolle <pebolle@tiscali.nl> Cc: Jianpeng Ma <majianpeng@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mgorman@suse.de> Cc: David Rientjes <rientjes@google.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Tom Rini <trini@ti.com> Link: http://lkml.kernel.org/r/1374776770-32361-1-git-send-email-trini@ti.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nodemask.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 4e2cbfa640b7..58b9a02c38d2 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -98,8 +98,17 @@
98typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; 98typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
99extern nodemask_t _unused_nodemask_arg_; 99extern nodemask_t _unused_nodemask_arg_;
100 100
101/*
102 * The inline keyword gives the compiler room to decide to inline, or
103 * not inline a function as it sees best. However, as these functions
104 * are called in both __init and non-__init functions, if they are not
105 * inlined we will end up with a section mis-match error (of the type of
106 * freeable items not being freed). So we must use __always_inline here
107 * to fix the problem. If other functions in the future also end up in
108 * this situation they will also need to be annotated as __always_inline
109 */
101#define node_set(node, dst) __node_set((node), &(dst)) 110#define node_set(node, dst) __node_set((node), &(dst))
102static inline void __node_set(int node, volatile nodemask_t *dstp) 111static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
103{ 112{
104 set_bit(node, dstp->bits); 113 set_bit(node, dstp->bits);
105} 114}