aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memory_hotplug.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-01 16:24:07 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-01 16:24:07 -0400
commitaba6efc47133af4941cda16e690f71b7ad894da2 (patch)
tree52c4863acd636118320fe2a47bf2f2d3c5b2a930 /include/linux/memory_hotplug.h
parent173a5a4c909789fcd57d00355d2237618a3824a4 (diff)
Memory hotplug: Move alternative function definitions to header
Move the definitions of offline_pages() and remove_memory() for CONFIG_MEMORY_HOTREMOVE to memory_hotplug.h, where they belong, and make them static inline. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r--include/linux/memory_hotplug.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 00569fb4ed6a..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,6 +245,13 @@ 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
248extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, 257extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,