summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mem.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-10-14 22:17:47 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2014-11-05 21:00:46 +1100
commit16d0f5c4af76b0c3424290937bf1ac22adf439b1 (patch)
tree5a9cc3a237c846b25535bbf719d702eaf0f7d656 /arch/powerpc/mm/mem.c
parent64ff91ff85b56321e65b476e335955af9bed2c66 (diff)
downloadop-kernel-dev-16d0f5c4af76b0c3424290937bf1ac22adf439b1.zip
op-kernel-dev-16d0f5c4af76b0c3424290937bf1ac22adf439b1.tar.gz
powerpc: Remove ppc_md.remove_memory
We have an extra level of indirection on memory hot remove which is not matched on memory hot add. Memory hotplug is book3s only, so there is no need for it. This also enables means remove_memory() (ie memory hot unplug) works on powernv. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r--arch/powerpc/mm/mem.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 8ebaac7..2add0b7 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -35,6 +35,7 @@
#include <linux/memblock.h>
#include <linux/hugetlb.h>
#include <linux/slab.h>
+#include <linux/vmalloc.h>
#include <asm/pgalloc.h>
#include <asm/prom.h>
@@ -144,8 +145,17 @@ int arch_remove_memory(u64 start, u64 size)
zone = page_zone(pfn_to_page(start_pfn));
ret = __remove_pages(zone, start_pfn, nr_pages);
- if (!ret && (ppc_md.remove_memory))
- ret = ppc_md.remove_memory(start, size);
+ if (ret)
+ return ret;
+
+ /* Remove htab bolted mappings for this section of memory */
+ start = (unsigned long)__va(start);
+ ret = remove_section_mapping(start, start + size);
+
+ /* Ensure all vmalloc mappings are flushed in case they also
+ * hit that section of memory
+ */
+ vm_unmap_aliases();
return ret;
}
OpenPOWER on IntegriCloud