diff options
Diffstat (limited to 'include/linux/memory_hotplug.h')
| -rw-r--r-- | include/linux/memory_hotplug.h | 14 |
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 | ||
| 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,15 +245,23 @@ 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 | ||
| 257 | extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, | ||
| 258 | void *arg, int (*func)(struct memory_block *, void *)); | ||
| 248 | extern int mem_online_node(int nid); | 259 | extern int mem_online_node(int nid); |
| 249 | extern int add_memory(int nid, u64 start, u64 size); | 260 | extern int add_memory(int nid, u64 start, u64 size); |
| 250 | extern int arch_add_memory(int nid, u64 start, u64 size); | 261 | extern int arch_add_memory(int nid, u64 start, u64 size); |
| 251 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | 262 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); |
| 252 | extern int offline_memory_block(struct memory_block *mem); | ||
| 253 | extern bool is_memblock_offlined(struct memory_block *mem); | 263 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 254 | extern int remove_memory(int nid, u64 start, u64 size); | 264 | extern void remove_memory(int nid, u64 start, u64 size); |
| 255 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | 265 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, |
| 256 | int nr_pages); | 266 | int nr_pages); |
| 257 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); | 267 | extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); |
