From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Mike Travis <travis@sgi.com>
Subject: [PATCH] Move numa_node_id default implementation to topology.h
Date: Fri, 13 Mar 2009 23:43:37 +1030 [thread overview]
Message-ID: <200903132343.37661.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090313053214.GA21183@elte.hu>
Impact: cleanup, potential bugfix
Not sure what changed to expose this, but clearly that numa_node_id()
doesn't belong in mmzone.h (the inline in gfp.h is probably overkill, too).
In file included from include/linux/topology.h:34,
from arch/x86/mm/numa.c:2:
/home/rusty/patches-cpumask/linux-2.6/arch/x86/include/asm/topology.h:64:1: warning: "numa_node_id" redefined
In file included from include/linux/topology.h:32,
from arch/x86/mm/numa.c:2:
include/linux/mmzone.h:770:1: warning: this is the location of the previous definition
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -4,6 +4,7 @@
#include <linux/mmzone.h>
#include <linux/stddef.h>
#include <linux/linkage.h>
+#include <linux/topology.h>
struct vm_area_struct;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -763,12 +763,6 @@ extern int numa_zonelist_order_handler(s
struct file *, void __user *, size_t *, loff_t *);
extern char numa_zonelist_order[];
#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */
-
-#include <linux/topology.h>
-/* Returns the number of the current Node. */
-#ifndef numa_node_id
-#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
-#endif
#ifndef CONFIG_NEED_MULTIPLE_NODES
diff --git a/include/linux/topology.h b/include/linux/topology.h
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -196,4 +196,9 @@ int arch_update_cpu_topology(void);
#define topology_core_cpumask(cpu) cpumask_of(cpu)
#endif
+/* Returns the number of the current Node. */
+#ifndef numa_node_id
+#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
+#endif
+
#endif /* _LINUX_TOPOLOGY_H */
next prev parent reply other threads:[~2009-03-13 13:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 4:23 [PULL] x86 cpumask work Rusty Russell
2009-03-12 10:26 ` Ingo Molnar
2009-03-12 10:37 ` Ingo Molnar
2009-03-12 22:54 ` Rusty Russell
2009-03-13 0:57 ` Ingo Molnar
2009-03-13 2:46 ` Rusty Russell
2009-03-13 3:20 ` Ingo Molnar
2009-03-13 4:34 ` Rusty Russell
2009-03-13 4:55 ` Ingo Molnar
2009-03-13 5:27 ` Ingo Molnar
2009-03-13 5:32 ` Ingo Molnar
2009-03-13 6:44 ` Rusty Russell
2009-03-13 13:12 ` Rusty Russell
2009-03-13 13:45 ` [tip:cpus4096] cpumask: convert node_to_cpumask_map[] to cpumask_var_t Rusty Russell
2009-03-13 15:27 ` [PULL] x86 cpumask work Ingo Molnar
2009-03-15 2:56 ` Rusty Russell
2009-03-15 6:00 ` Ingo Molnar
2009-03-16 3:03 ` Rusty Russell
2009-03-16 8:48 ` Ingo Molnar
2009-03-17 4:20 ` Rusty Russell
2009-03-17 10:51 ` Ingo Molnar
2009-03-17 21:27 ` Rusty Russell
2009-03-18 8:51 ` [tip:cpus4096] cpumask: fix CONFIG_CPUMASK_OFFSTACK=y cpu hotunplug crash Rusty Russell
2009-03-13 13:13 ` Rusty Russell [this message]
2009-03-13 13:45 ` [tip:cpus4096] numa, cpumask: move numa_node_id default implementation to topology.h Rusty Russell
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=200903132343.37661.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=travis@sgi.com \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.