From: tip-bot for Tom Rini <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, rusty@rustcorp.com.au, pebolle@tiscali.nl,
isimatu.yasuaki@jp.fujitsu.com, jiang.liu@huawei.com,
tglx@linutronix.de, rientjes@google.com, trini@ti.com,
laijs@cn.fujitsu.com, linux-kernel@vger.kernel.org,
hpa@zytor.com, majianpeng@gmail.com, yinghai@kernel.org,
greg@kroah.com, wency@cn.fujitsu.com, minchan.kim@gmail.com,
mgorman@suse.de, kosaki.motohiro@jp.fujitsu.com
Subject: [tip:sched/core] numa: Mark __node_set() as __always_inline
Date: Fri, 26 Jul 2013 13:04:00 -0700 [thread overview]
Message-ID: <tip-323f54ed0f3ce20e9946c961fc928ccdb80d9345@git.kernel.org> (raw)
In-Reply-To: <1374776770-32361-1-git-send-email-trini@ti.com>
Commit-ID: 323f54ed0f3ce20e9946c961fc928ccdb80d9345
Gitweb: http://git.kernel.org/tip/323f54ed0f3ce20e9946c961fc928ccdb80d9345
Author: Tom Rini <trini@ti.com>
AuthorDate: Thu, 25 Jul 2013 14:26:10 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 25 Jul 2013 21:54:01 +0200
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>
---
include/linux/nodemask.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 4e2cbfa..58b9a02 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -98,8 +98,17 @@
typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
extern nodemask_t _unused_nodemask_arg_;
+/*
+ * The inline keyword gives the compiler room to decide to inline, or
+ * not inline a function as it sees best. However, as these functions
+ * are called in both __init and non-__init functions, if they are not
+ * inlined we will end up with a section mis-match error (of the type of
+ * freeable items not being freed). So we must use __always_inline here
+ * to fix the problem. If other functions in the future also end up in
+ * this situation they will also need to be annotated as __always_inline
+ */
#define node_set(node, dst) __node_set((node), &(dst))
-static inline void __node_set(int node, volatile nodemask_t *dstp)
+static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
{
set_bit(node, dstp->bits);
}
prev parent reply other threads:[~2013-07-26 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 18:26 [PATCH v2] numa: Mark __node_set " Tom Rini
2013-07-25 19:16 ` KOSAKI Motohiro
2013-07-26 20:04 ` tip-bot for Tom Rini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-323f54ed0f3ce20e9946c961fc928ccdb80d9345@git.kernel.org \
--to=tipbot@zytor.com \
--cc=greg@kroah.com \
--cc=hpa@zytor.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=majianpeng@gmail.com \
--cc=mgorman@suse.de \
--cc=minchan.kim@gmail.com \
--cc=mingo@kernel.org \
--cc=pebolle@tiscali.nl \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=trini@ti.com \
--cc=wency@cn.fujitsu.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome