Skip to content

Commit

Permalink
memory unplug: ia64 interface
Browse files Browse the repository at this point in the history
IA64 memory unplug interface.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Oct 16, 2007
1 parent 0c0e619 commit de33b82
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,17 @@ int arch_add_memory(int nid, u64 start, u64 size)

int remove_memory(u64 start, u64 size)
{
return -EINVAL;
unsigned long start_pfn, end_pfn;
unsigned long timeout = 120 * HZ;
int ret;
start_pfn = start >> PAGE_SHIFT;
end_pfn = start_pfn + (size >> PAGE_SHIFT);
ret = offline_pages(start_pfn, end_pfn, timeout);
if (ret)
goto out;
/* we can free mem_map at this point */
out:
return ret;
}
EXPORT_SYMBOL_GPL(remove_memory);
#endif

0 comments on commit de33b82

Please sign in to comment.