]> err.no Git - linux-2.6/blobdiff - include/linux/memory_hotplug.h
Pull sony into release branch
[linux-2.6] / include / linux / memory_hotplug.h
index c6fd2c0323fcc4a91f003c942ad28b09719f6bbe..7b54666cea8e9d3ea1b5c66682f2ea7a36e0fc72 100644 (file)
@@ -84,13 +84,9 @@ static inline int memory_add_physaddr_to_nid(u64 start)
  * Now, arch_free_nodedata() is just defined for error path of node_hot_add.
  *
  */
-static inline pg_data_t *arch_alloc_nodedata(int nid)
-{
-       return NULL;
-}
-static inline void arch_free_nodedata(pg_data_t *pgdat)
-{
-}
+extern pg_data_t *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 */
 
@@ -114,6 +110,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 +127,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 */
 
@@ -167,5 +172,7 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
 extern int add_memory(int nid, u64 start, u64 size);
 extern int arch_add_memory(int nid, u64 start, u64 size);
 extern int remove_memory(u64 start, u64 size);
+extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
+                                                               int nr_pages);
 
 #endif /* __LINUX_MEMORY_HOTPLUG_H */