From: Yasunori Goto 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 Signed-off-by: KAMEZAWA Hiroyuki Cc: Dave Hansen Cc: "Brown, Len" Signed-off-by: Andrew Morton --- arch/ia64/Kconfig | 4 ++++ include/linux/memory_hotplug.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff -puN arch/ia64/Kconfig~pgdat-allocation-for-new-node-add-refresh-node_data arch/ia64/Kconfig --- 25/arch/ia64/Kconfig~pgdat-allocation-for-new-node-add-refresh-node_data Fri May 26 15:55:04 2006 +++ 25-akpm/arch/ia64/Kconfig Fri May 26 15:55:04 2006 @@ -375,6 +375,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 diff -puN include/linux/memory_hotplug.h~pgdat-allocation-for-new-node-add-refresh-node_data include/linux/memory_hotplug.h --- 25/include/linux/memory_hotplug.h~pgdat-allocation-for-new-node-add-refresh-node_data Fri May 26 15:55:04 2006 +++ 25-akpm/include/linux/memory_hotplug.h Fri May 26 15:55:09 2006 @@ -91,6 +91,9 @@ static inline pg_data_t *arch_alloc_node 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 */ #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_n 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 */ _