aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hotplug-memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-memory.c')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 1bbb78fab530..fa41f0da5b6f 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -12,7 +12,6 @@
12#include <linux/of.h> 12#include <linux/of.h>
13#include <linux/of_address.h> 13#include <linux/of_address.h>
14#include <linux/memblock.h> 14#include <linux/memblock.h>
15#include <linux/vmalloc.h>
16#include <linux/memory.h> 15#include <linux/memory.h>
17#include <linux/memory_hotplug.h> 16#include <linux/memory_hotplug.h>
18 17
@@ -66,22 +65,6 @@ unsigned long pseries_memory_block_size(void)
66} 65}
67 66
68#ifdef CONFIG_MEMORY_HOTREMOVE 67#ifdef CONFIG_MEMORY_HOTREMOVE
69static int pseries_remove_memory(u64 start, u64 size)
70{
71 int ret;
72
73 /* Remove htab bolted mappings for this section of memory */
74 start = (unsigned long)__va(start);
75 ret = remove_section_mapping(start, start + size);
76
77 /* Ensure all vmalloc mappings are flushed in case they also
78 * hit that section of memory
79 */
80 vm_unmap_aliases();
81
82 return ret;
83}
84
85static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size) 68static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size)
86{ 69{
87 unsigned long block_sz, start_pfn; 70 unsigned long block_sz, start_pfn;
@@ -261,10 +244,6 @@ static int __init pseries_memory_hotplug_init(void)
261 if (firmware_has_feature(FW_FEATURE_LPAR)) 244 if (firmware_has_feature(FW_FEATURE_LPAR))
262 of_reconfig_notifier_register(&pseries_mem_nb); 245 of_reconfig_notifier_register(&pseries_mem_nb);
263 246
264#ifdef CONFIG_MEMORY_HOTREMOVE
265 ppc_md.remove_memory = pseries_remove_memory;
266#endif
267
268 return 0; 247 return 0;
269} 248}
270machine_device_initcall(pseries, pseries_memory_hotplug_init); 249machine_device_initcall(pseries, pseries_memory_hotplug_init);