* + add-remove_memory-for-ppc64-2.patch added to -mm tree
@ 2007-10-31 22:58 akpm
2007-11-01 0:52 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-10-31 22:58 UTC (permalink / raw)
To: mm-commits
Cc: pbadari, benh, galak, haveblue, kamezawa.hiroyu, paulus,
tony.luck
The patch titled
add remove_memory() for ppc64
has been added to the -mm tree. Its filename is
add-remove_memory-for-ppc64-2.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: add remove_memory() for ppc64
From: Badari Pulavarty <pbadari@us.ibm.com>
remove_memory() is common across ia64, ppc64. There is no point in
providing exactly same arch-specific routines. Make this generic and add
arch-specific hooks if needed by any other archs.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/ia64/mm/init.c | 17 -----------------
mm/memory_hotplug.c | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 17 deletions(-)
diff -puN arch/ia64/mm/init.c~add-remove_memory-for-ppc64-2 arch/ia64/mm/init.c
--- a/arch/ia64/mm/init.c~add-remove_memory-for-ppc64-2
+++ a/arch/ia64/mm/init.c
@@ -718,21 +718,4 @@ int arch_add_memory(int nid, u64 start,
return ret;
}
-#ifdef CONFIG_MEMORY_HOTREMOVE
-int remove_memory(u64 start, u64 size)
-{
- 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 /* CONFIG_MEMORY_HOTREMOVE */
#endif
diff -puN mm/memory_hotplug.c~add-remove_memory-for-ppc64-2 mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~add-remove_memory-for-ppc64-2
+++ a/mm/memory_hotplug.c
@@ -653,6 +653,22 @@ failed_removal:
return ret;
}
+
+int remove_memory(u64 start, u64 size)
+{
+ unsigned long start_pfn, end_pfn;
+ int ret;
+
+ start_pfn = start >> PAGE_SHIFT;
+ end_pfn = start_pfn + (size >> PAGE_SHIFT);
+ ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
+ if (ret)
+ goto out;
+ /* we can free mem_map at this point */
+out:
+ return ret;
+}
+EXPORT_SYMBOL_GPL(remove_memory);
#else
int remove_memory(u64 start, u64 size)
{
_
Patches currently in -mm which might be from pbadari@us.ibm.com are
powerpc-move-_rtc_time-routines-under-config_adb_cuda.patch
hugetlb-allow-sticky-directory-mount-option.patch
memory-hotplug-add-removable-to-sysfs-to-show-memblock-removability.patch
add-remove_memory-for-ppc64-2.patch
enable-hotplug-memory-remove-for-ppc64.patch
add-arch-specific-walk_memory_remove-for-ppc64.patch
mem-controller-gfp-mask-fix.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + add-remove_memory-for-ppc64-2.patch added to -mm tree
2007-10-31 22:58 + add-remove_memory-for-ppc64-2.patch added to -mm tree akpm
@ 2007-11-01 0:52 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 2+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-11-01 0:52 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, mm-commits, pbadari, benh, galak, haveblue, paulus,
tony.luck
On Wed, 31 Oct 2007 15:58:33 -0700
akpm@linux-foundation.org wrote:
> +int remove_memory(u64 start, u64 size)
> +{
> + unsigned long start_pfn, end_pfn;
> + int ret;
> +
> + start_pfn = start >> PAGE_SHIFT;
> + end_pfn = start_pfn + (size >> PAGE_SHIFT);
> + ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
> + if (ret)
> + goto out;
> + /* we can free mem_map at this point */
> +out:
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(remove_memory);
Then, remove_memory() is now generic.
Ok.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-01 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 22:58 + add-remove_memory-for-ppc64-2.patch added to -mm tree akpm
2007-11-01 0:52 ` KAMEZAWA Hiroyuki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.