From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>,
linux-mm <linux-mm@kvack.org>,
linux-numa <linux-numa@vger.kernel.org>
Cc: Jack Steiner <steiner@sgi.com>
Subject: [PATCH] add numa_random() stub for non-NUMA build
Date: Mon, 17 May 2010 17:06:49 -0400 [thread overview]
Message-ID: <1274130409.24007.138.camel@useless.americas.hpqcorp.net> (raw)
Against 2.6.34-rc7-mmotm-100514-1333:
Define stub numa_random() for !NUMA configuration.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
include/linux/nodemask.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6.34-rc7-mmotm-100514-1333/include/linux/nodemask.h
===================================================================
--- linux-2.6.34-rc7-mmotm-100514-1333.orig/include/linux/nodemask.h 2010-05-17 08:40:39.000000000 -0400
+++ linux-2.6.34-rc7-mmotm-100514-1333/include/linux/nodemask.h 2010-05-17 16:37:18.000000000 -0400
@@ -269,9 +269,6 @@ static inline int __first_unset_node(con
find_first_zero_bit(maskp->bits, MAX_NUMNODES));
}
-#define node_random(mask) __node_random(&(mask))
-extern int __node_random(const nodemask_t *maskp);
-
#define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
#if MAX_NUMNODES <= BITS_PER_LONG
@@ -435,6 +432,10 @@ static inline void node_set_offline(int
node_clear_state(nid, N_ONLINE);
nr_online_nodes = num_node_state(N_ONLINE);
}
+
+#define node_random(mask) __node_random(&(mask))
+extern int __node_random(const nodemask_t *maskp);
+
#else
static inline int node_state(int node, enum node_states state)
@@ -465,6 +466,8 @@ static inline int num_node_state(enum no
#define node_set_online(node) node_set_state((node), N_ONLINE)
#define node_set_offline(node) node_clear_state((node), N_ONLINE)
+
+static inline int node_random(const nodemask_t mask) { return 0; }
#endif
#define node_online_map node_states[N_ONLINE]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2010-05-17 21:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1274130409.24007.138.camel@useless.americas.hpqcorp.net \
--to=lee.schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=linux-numa@vger.kernel.org \
--cc=steiner@sgi.com \
/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