diff options
| -rw-r--r-- | include/linux/memory_hotplug.h | 9 | ||||
| -rw-r--r-- | mm/memory_hotplug.c | 8 |
2 files changed, 10 insertions, 7 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 | ||
| 235 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | 235 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); |
| 236 | extern void try_offline_node(int nid); | 236 | extern void try_offline_node(int nid); |
| 237 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | ||
| 238 | extern void remove_memory(int nid, u64 start, u64 size); | ||
| 237 | 239 | ||
| 238 | #else | 240 | #else |
| 239 | static inline int is_mem_section_removable(unsigned long pfn, | 241 | static 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 | ||
| 245 | static inline void try_offline_node(int nid) {} | 247 | static inline void try_offline_node(int nid) {} |
| 248 | |||
| 249 | static inline int offline_pages(unsigned long start_pfn, unsigned long nr_pages) | ||
| 250 | { | ||
| 251 | return -EINVAL; | ||
| 252 | } | ||
| 253 | |||
| 254 | static inline void remove_memory(int nid, u64 start, u64 size) {} | ||
| 246 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 255 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
| 247 | 256 | ||
| 248 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, | 257 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 7026fbc42aaa..490e3d401e2c 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
| @@ -1822,11 +1822,5 @@ void __ref remove_memory(int nid, u64 start, u64 size) | |||
| 1822 | 1822 | ||
| 1823 | unlock_memory_hotplug(); | 1823 | unlock_memory_hotplug(); |
| 1824 | } | 1824 | } |
| 1825 | #else | ||
| 1826 | int offline_pages(unsigned long start_pfn, unsigned long nr_pages) | ||
| 1827 | { | ||
| 1828 | return -EINVAL; | ||
| 1829 | } | ||
| 1830 | void remove_memory(int nid, u64 start, u64 size) {} | ||
| 1831 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
| 1832 | EXPORT_SYMBOL_GPL(remove_memory); | 1825 | EXPORT_SYMBOL_GPL(remove_memory); |
| 1826 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
