summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/machdep.h
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2014-01-27 17:54:06 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-03-07 05:53:13 +0100
commit9ac8cde938481cd0e3f700b8f071c4eca989c9f6 (patch)
treefde7e3f06a387cbe91661396b40b9dbc714e40cc /arch/powerpc/include/asm/machdep.h
parentselftests/powerpc: Import Anton's memcpy / copy_tofrom_user tests (diff)
downloadlinux-9ac8cde938481cd0e3f700b8f071c4eca989c9f6.tar.xz
linux-9ac8cde938481cd0e3f700b8f071c4eca989c9f6.zip
powerpc/pseries: Use remove_memory() to remove memory
The memory remove code for powerpc/pseries should call remove_memory() so that we are holding the hotplug_memory lock during memory remove operations. This patch updates the memory node remove handler to call remove_memory() and adds a ppc_md.remove_memory() entry to handle pseries specific work that is called from arch_remove_memory(). During memory remove in pseries_remove_memblock() we have to stay with removing memory one section at a time. This is needed because of how memory resources are handled. During memory add for pseries (via the probe file in sysfs) we add memory one section at a time which gives us a memory resource for each section. Future patches will aim to address this so will not have to remove memory one section at a time. Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/machdep.h')
-rw-r--r--arch/powerpc/include/asm/machdep.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 4da6574e9a20..5b6c03f1058f 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -282,6 +282,10 @@ struct machdep_calls {
#ifdef CONFIG_ARCH_RANDOM
int (*get_random_long)(unsigned long *v);
#endif
+
+#ifdef CONFIG_MEMORY_HOTREMOVE
+ int (*remove_memory)(u64, u64);
+#endif
};
extern void e500_idle(void);