diff options
Diffstat (limited to 'include/linux/memory_hotplug.h')
| -rw-r--r-- | include/linux/memory_hotplug.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index ea9f5ad9ec8e..763ba81fc0f0 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -13,12 +13,12 @@ struct mem_section; | |||
| 13 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 14 | 14 | ||
| 15 | /* | 15 | /* |
| 16 | * Magic number for free bootmem. | 16 | * Types for free bootmem. |
| 17 | * The normal smallest mapcount is -1. Here is smaller value than it. | 17 | * The normal smallest mapcount is -1. Here is smaller value than it. |
| 18 | */ | 18 | */ |
| 19 | #define SECTION_INFO 0xfffffffe | 19 | #define SECTION_INFO (-1 - 1) |
| 20 | #define MIX_INFO 0xfffffffd | 20 | #define MIX_SECTION_INFO (-1 - 2) |
| 21 | #define NODE_INFO 0xfffffffc | 21 | #define NODE_INFO (-1 - 3) |
| 22 | 22 | ||
| 23 | /* | 23 | /* |
| 24 | * pgdat resizing functions | 24 | * pgdat resizing functions |
| @@ -199,6 +199,18 @@ extern int walk_memory_resource(unsigned long start_pfn, | |||
| 199 | unsigned long nr_pages, void *arg, | 199 | unsigned long nr_pages, void *arg, |
| 200 | int (*func)(unsigned long, unsigned long, void *)); | 200 | int (*func)(unsigned long, unsigned long, void *)); |
| 201 | 201 | ||
| 202 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
| 203 | |||
| 204 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | ||
| 205 | |||
| 206 | #else | ||
| 207 | static inline int is_mem_section_removable(unsigned long pfn, | ||
| 208 | unsigned long nr_pages) | ||
| 209 | { | ||
| 210 | return 0; | ||
| 211 | } | ||
| 212 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
| 213 | |||
| 202 | extern int add_memory(int nid, u64 start, u64 size); | 214 | extern int add_memory(int nid, u64 start, u64 size); |
| 203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 215 | extern int arch_add_memory(int nid, u64 start, u64 size); |
| 204 | extern int remove_memory(u64 start, u64 size); | 216 | extern int remove_memory(u64 start, u64 size); |
