aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memory_hotplug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r--include/linux/memory_hotplug.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 3e622c610925..dd38e62b84d2 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -234,6 +234,8 @@ static inline void unlock_memory_hotplug(void) {}
234 234
235extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); 235extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages);
236extern void try_offline_node(int nid); 236extern void try_offline_node(int nid);
237extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
238extern void remove_memory(int nid, u64 start, u64 size);
237 239
238#else 240#else
239static inline int is_mem_section_removable(unsigned long pfn, 241static inline int is_mem_section_removable(unsigned long pfn,
@@ -243,15 +245,23 @@ static inline int is_mem_section_removable(unsigned long pfn,
243} 245}
244 246
245static inline void try_offline_node(int nid) {} 247static inline void try_offline_node(int nid) {}
248
249static inline int offline_pages(unsigned long start_pfn, unsigned long nr_pages)
250{
251 return -EINVAL;
252}
253
254static inline void remove_memory(int nid, u64 start, u64 size) {}
246#endif /* CONFIG_MEMORY_HOTREMOVE */ 255#endif /* CONFIG_MEMORY_HOTREMOVE */
247 256
257extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,
258 void *arg, int (*func)(struct memory_block *, void *));
248extern int mem_online_node(int nid); 259extern int mem_online_node(int nid);
249extern int add_memory(int nid, u64 start, u64 size); 260extern int add_memory(int nid, u64 start, u64 size);
250extern int arch_add_memory(int nid, u64 start, u64 size); 261extern int arch_add_memory(int nid, u64 start, u64 size);
251extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); 262extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
252extern int offline_memory_block(struct memory_block *mem);
253extern bool is_memblock_offlined(struct memory_block *mem); 263extern bool is_memblock_offlined(struct memory_block *mem);
254extern int remove_memory(int nid, u64 start, u64 size); 264extern void remove_memory(int nid, u64 start, u64 size);
255extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, 265extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
256 int nr_pages); 266 int nr_pages);
257extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); 267extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms);