Skip to content

Commit

Permalink
memory-hotplug: integrated __remove_section() of CONFIG_SPARSEMEM_VME…
Browse files Browse the repository at this point in the history
…MMAP.

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 <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Tang Chen <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Jiang Liu <[email protected]>
Cc: Jianguo Wu <[email protected]>
Cc: Kamezawa Hiroyuki <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: Wu Jianguo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
tang-chen authored and torvalds committed Feb 24, 2013
1 parent 0197518 commit 5fc1d66
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 5fc1d66

Please sign in to comment.