aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memory_hotplug.h
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2006-06-27 02:53:33 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:36 -0700
commit10ad400b49aca15ecf83b0fde7e35e4064b15c85 (patch)
tree336de747d6839add8ab3a7f70367e87ddbc7d155 /include/linux/memory_hotplug.h
parent[PATCH] pgdat allocation for new node add (generic alloc node_data) (diff)
downloadlinux-dev-10ad400b49aca15ecf83b0fde7e35e4064b15c85.tar.xz
linux-dev-10ad400b49aca15ecf83b0fde7e35e4064b15c85.zip
[PATCH] pgdat allocation for new node add (refresh node_data[])
Refresh NODE_DATA() for generic archs. In this case, NODE_DATA(nid) == node_data[nid]. node_data[] is array of address of pgdat. So, refresh is quite simple. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r--include/linux/memory_hotplug.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index c6fd2c0323fc..569b1f6c27d1 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -91,6 +91,9 @@ static inline pg_data_t *arch_alloc_nodedata(int nid)
static inline void arch_free_nodedata(pg_data_t *pgdat)
{
}
+static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
+{
+}
#else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
@@ -114,6 +117,12 @@ static inline void arch_free_nodedata(pg_data_t *pgdat)
*/
#define generic_free_nodedata(pgdat) kfree(pgdat)
+extern pg_data_t *node_data[];
+static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
+{
+ node_data[nid] = pgdat;
+}
+
#else /* !CONFIG_NUMA */
/* never called */
@@ -125,6 +134,9 @@ static inline pg_data_t *generic_alloc_nodedata(int nid)
static inline void generic_free_nodedata(pg_data_t *pgdat)
{
}
+static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
+{
+}
#endif /* CONFIG_NUMA */
#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */