Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116087
b: refs/heads/master
c: 3159e7d
h: refs/heads/master
i:
  116085: abf03d1
  116083: 0223375
  116079: 8b7dd03
v: v3
  • Loading branch information
Paul Mundt committed Sep 8, 2008
1 parent 6def545 commit 1a40263
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5840263ecb95e55a2d248fc740644a2c9171a61c
refs/heads/master: 3159e7d62ad13f71ef3fe029c145594d8caa580d
4 changes: 4 additions & 0 deletions trunk/arch/sh/mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
def_bool y
depends on SPARSEMEM

config ARCH_ENABLE_MEMORY_HOTREMOVE
def_bool y
depends on SPARSEMEM

config ARCH_MEMORY_PROBE
def_bool y
depends on MEMORY_HOTPLUG
Expand Down
17 changes: 17 additions & 0 deletions trunk/arch/sh/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,21 @@ int memory_add_physaddr_to_nid(u64 addr)
}
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
#endif

#ifdef CONFIG_MEMORY_HOTREMOVE
int remove_memory(u64 start, u64 size)
{
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long end_pfn = start_pfn + (size >> PAGE_SHIFT);
int ret;

ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
if (unlikely(ret))
printk("%s: Failed, offline_pages() == %d\n", __func__, ret);

return ret;
}
EXPORT_SYMBOL_GPL(remove_memory);
#endif

#endif /* CONFIG_MEMORY_HOTPLUG */

0 comments on commit 1a40263

Please sign in to comment.