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.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index aca9c65f8d08..73e358612eaf 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -11,6 +11,15 @@ struct pglist_data;
11struct mem_section; 11struct mem_section;
12 12
13#ifdef CONFIG_MEMORY_HOTPLUG 13#ifdef CONFIG_MEMORY_HOTPLUG
14
15/*
16 * Magic number for free bootmem.
17 * The normal smallest mapcount is -1. Here is smaller value than it.
18 */
19#define SECTION_INFO 0xfffffffe
20#define MIX_INFO 0xfffffffd
21#define NODE_INFO 0xfffffffc
22
14/* 23/*
15 * pgdat resizing functions 24 * pgdat resizing functions
16 */ 25 */
@@ -145,6 +154,18 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
145#endif /* CONFIG_NUMA */ 154#endif /* CONFIG_NUMA */
146#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ 155#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
147 156
157#ifdef CONFIG_SPARSEMEM_VMEMMAP
158static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
159{
160}
161static inline void put_page_bootmem(struct page *page)
162{
163}
164#else
165extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
166extern void put_page_bootmem(struct page *page);
167#endif
168
148#else /* ! CONFIG_MEMORY_HOTPLUG */ 169#else /* ! CONFIG_MEMORY_HOTPLUG */
149/* 170/*
150 * Stub functions for when hotplug is off 171 * Stub functions for when hotplug is off
@@ -172,6 +193,10 @@ static inline int mhp_notimplemented(const char *func)
172 return -ENOSYS; 193 return -ENOSYS;
173} 194}
174 195
196static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
197{
198}
199
175#endif /* ! CONFIG_MEMORY_HOTPLUG */ 200#endif /* ! CONFIG_MEMORY_HOTPLUG */
176 201
177extern int add_memory(int nid, u64 start, u64 size); 202extern int add_memory(int nid, u64 start, u64 size);
@@ -180,5 +205,7 @@ extern int remove_memory(u64 start, u64 size);
180extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, 205extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
181 int nr_pages); 206 int nr_pages);
182extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); 207extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms);
208extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
209 unsigned long pnum);
183 210
184#endif /* __LINUX_MEMORY_HOTPLUG_H */ 211#endif /* __LINUX_MEMORY_HOTPLUG_H */