This function 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 <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Index: pgdat6/include/linux/memory_hotplug.h
===================================================================
--- pgdat6.orig/include/linux/memory_hotplug.h 2006-03-06 19:42:21.000000000 +0900
+++ pgdat6/include/linux/memory_hotplug.h 2006-03-06 19:42:30.000000000 +0900
@@ -87,10 +87,13 @@ static inline int arch_nid_probe(u64 sta
*/
extern struct pglist_data * arch_alloc_nodedata(int nid);
extern void arch_free_nodedata(pg_data_t *pgdat);
+extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
#else /* !CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
#define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid)
#define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat)
+#define arch_refresh_nodedata(nid, pgdat) \
+ generic_refresh_nodedata(nid, pgdat)
#ifdef CONFIG_NUMA
/*
@@ -109,6 +112,11 @@ static inline void generic_free_nodedata
kfree(pgdat);
}
+static inline void generic_refresh_nodedata(int nid, struct pglist_data *pgdat)
+{
+ NODE_DATA(nid) = pgdat;
+}
+
#else /* !CONFIG_NUMA */
/* never called */
static inline struct pglist_data *generic_alloc_nodedata(int nid)
@@ -119,6 +127,9 @@ static inline struct pglist_data *generi
static inline void generic_free_nodedata(struct pglist_data *pgdat)
{
}
+static inline void generic_refresh_nodedata(int nid, struct pglist_data *pgdat)
+{
+}
#endif /* CONFIG_NUMA */
#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
--
Yasunori Goto
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]