diff options
Diffstat (limited to 'include/linux/memory_hotplug.h')
| -rw-r--r-- | include/linux/memory_hotplug.h | 24 | 
1 files changed, 14 insertions, 10 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 4a45c4e5002..3e622c61092 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -96,13 +96,14 @@ extern void __online_page_free(struct page *page);  #ifdef CONFIG_MEMORY_HOTREMOVE  extern bool is_pageblock_removable_nolock(struct page *page); +extern int arch_remove_memory(u64 start, u64 size); +extern int __remove_pages(struct zone *zone, unsigned long start_pfn, +	unsigned long nr_pages);  #endif /* CONFIG_MEMORY_HOTREMOVE */  /* reasonably generic interface to expand the physical pages in a zone  */  extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn,  	unsigned long nr_pages); -extern int __remove_pages(struct zone *zone, unsigned long start_pfn, -	unsigned long nr_pages);  #ifdef CONFIG_NUMA  extern int memory_add_physaddr_to_nid(u64 start); @@ -173,17 +174,16 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)  #endif /* CONFIG_NUMA */  #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ -#ifdef CONFIG_SPARSEMEM_VMEMMAP +#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE +extern void register_page_bootmem_info_node(struct pglist_data *pgdat); +#else  static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)  {  } -static inline void put_page_bootmem(struct page *page) -{ -} -#else -extern void register_page_bootmem_info_node(struct pglist_data *pgdat); -extern void put_page_bootmem(struct page *page);  #endif +extern void put_page_bootmem(struct page *page); +extern void get_page_bootmem(unsigned long ingo, struct page *page, +			     unsigned long type);  /*   * Lock for memory hotplug guarantees 1) all callbacks for memory hotplug @@ -233,6 +233,7 @@ static inline void unlock_memory_hotplug(void) {}  #ifdef CONFIG_MEMORY_HOTREMOVE  extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); +extern void try_offline_node(int nid);  #else  static inline int is_mem_section_removable(unsigned long pfn, @@ -240,6 +241,8 @@ static inline int is_mem_section_removable(unsigned long pfn,  {  	return 0;  } + +static inline void try_offline_node(int nid) {}  #endif /* CONFIG_MEMORY_HOTREMOVE */  extern int mem_online_node(int nid); @@ -247,7 +250,8 @@ extern int add_memory(int nid, u64 start, u64 size);  extern int arch_add_memory(int nid, u64 start, u64 size);  extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);  extern int offline_memory_block(struct memory_block *mem); -extern int remove_memory(u64 start, u64 size); +extern bool is_memblock_offlined(struct memory_block *mem); +extern int remove_memory(int nid, u64 start, u64 size);  extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,  								int nr_pages);  extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms);  |