From 0773e6115b3fbfce75488a481fa0f0e853373199 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Wed, 20 Feb 2013 13:14:18 +1100 Subject: [PATCH] memory-hotplug: integrated __remove_section() of CONFIG_SPARSEMEM_VMEMMAP. Currently __remove_section for SPARSEMEM_VMEMMAP does nothing. But even if we use SPARSEMEM_VMEMMAP, we can unregister the memory_section. Signed-off-by: Yasuaki Ishimatsu Signed-off-by: Wen Congyang Signed-off-by: Tang Chen Cc: KOSAKI Motohiro Cc: Jiang Liu Cc: Jianguo Wu Cc: Kamezawa Hiroyuki Cc: Lai Jiangshan Cc: Wu Jianguo Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton --- mm/memory_hotplug.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 05f5773afa1c..aad2f03e20b2 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -432,16 +432,6 @@ static int __meminit __add_section(int nid, struct zone *zone, return register_new_memory(nid, __pfn_to_section(phys_start_pfn)); } -#ifdef CONFIG_SPARSEMEM_VMEMMAP -static int __remove_section(struct zone *zone, struct mem_section *ms) -{ - /* - * XXX: Freeing memmap with vmemmap is not implement yet. - * This should be removed later. - */ - return -EBUSY; -} -#else static int __remove_section(struct zone *zone, struct mem_section *ms) { int ret = -EINVAL; @@ -456,7 +446,6 @@ static int __remove_section(struct zone *zone, struct mem_section *ms) sparse_remove_one_section(zone, ms); return 0; } -#endif /* * Reasonably generic function for adding memory. It is -- 2.39.5