aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2006-06-27 05:53:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 20:32:36 -0400
commit10ad400b49aca15ecf83b0fde7e35e4064b15c85 (patch)
tree336de747d6839add8ab3a7f70367e87ddbc7d155
parent306d6cbe86e2e6603ac3162e1294d5c75cfdeca6 (diff)
[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>
-rw-r--r--arch/ia64/Kconfig4
-rw-r--r--include/linux/memory_hotplug.h12
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 18318749884b..a56df7bf022d 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -374,6 +374,10 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
374 def_bool y 374 def_bool y
375 depends on NEED_MULTIPLE_NODES 375 depends on NEED_MULTIPLE_NODES
376 376
377config HAVE_ARCH_NODEDATA_EXTENSION
378 def_bool y
379 depends on NUMA
380
377config IA32_SUPPORT 381config IA32_SUPPORT
378 bool "Support for Linux/x86 binaries" 382 bool "Support for Linux/x86 binaries"
379 help 383 help
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)
91static inline void arch_free_nodedata(pg_data_t *pgdat) 91static inline void arch_free_nodedata(pg_data_t *pgdat)
92{ 92{
93} 93}
94static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
95{
96}
94 97
95#else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ 98#else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
96 99
@@ -114,6 +117,12 @@ static inline void arch_free_nodedata(pg_data_t *pgdat)
114 */ 117 */
115#define generic_free_nodedata(pgdat) kfree(pgdat) 118#define generic_free_nodedata(pgdat) kfree(pgdat)
116 119
120extern pg_data_t *node_data[];
121static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
122{
123 node_data[nid] = pgdat;
124}
125
117#else /* !CONFIG_NUMA */ 126#else /* !CONFIG_NUMA */
118 127
119/* never called */ 128/* never called */
@@ -125,6 +134,9 @@ static inline pg_data_t *generic_alloc_nodedata(int nid)
125static inline void generic_free_nodedata(pg_data_t *pgdat) 134static inline void generic_free_nodedata(pg_data_t *pgdat)
126{ 135{
127} 136}
137static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
138{
139}
128#endif /* CONFIG_NUMA */ 140#endif /* CONFIG_NUMA */
129#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ 141#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
130 142