]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[PATCH] pgdat allocation for new node add (refresh node_data[])
authorYasunori Goto <y-goto@jp.fujitsu.com>
Tue, 27 Jun 2006 09:53:33 +0000 (02:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:36 +0000 (17:32 -0700)
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>
arch/ia64/Kconfig
include/linux/memory_hotplug.h

index 18318749884b012f1f2e3d879a633a7ed21802bd..a56df7bf022da153c2efe0035526e296df419d0a 100644 (file)
@@ -374,6 +374,10 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
        def_bool y
        depends on NEED_MULTIPLE_NODES
 
+config HAVE_ARCH_NODEDATA_EXTENSION
+       def_bool y
+       depends on NUMA
+
 config IA32_SUPPORT
        bool "Support for Linux/x86 binaries"
        help
index c6fd2c0323fcc4a91f003c942ad28b09719f6bbe..569b1f6c27d17acbaee4e01812818546d9e6670a 100644 (file)
@@ -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 */