diff options
author | Li Zhong <zhong@linux.vnet.ibm.com> | 2014-06-11 04:23:37 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-05 02:34:15 -0400 |
commit | ed5694a8464a133582c632f8081324408bcc486d (patch) | |
tree | 841e712ff24ce6bedead1f6c45b57942023376b3 /arch/powerpc/mm | |
parent | bd8cb03dbe77a529945aa270a18c1ba074f729c6 (diff) |
powerpc: implement vmemmap_remove_mapping() for BOOK3S
This is to be called in vmemmap_free(), leave the implementation on BOOK3E
empty as before.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 6b7c1c824cf9..daee7f4e5a14 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -243,7 +243,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
243 | } | 243 | } |
244 | 244 | ||
245 | #ifdef CONFIG_MEMORY_HOTPLUG | 245 | #ifdef CONFIG_MEMORY_HOTPLUG |
246 | static int htab_remove_mapping(unsigned long vstart, unsigned long vend, | 246 | int htab_remove_mapping(unsigned long vstart, unsigned long vend, |
247 | int psize, int ssize) | 247 | int psize, int ssize) |
248 | { | 248 | { |
249 | unsigned long vaddr; | 249 | unsigned long vaddr; |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index fa5d28b4e726..69203c8afb51 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -212,6 +212,13 @@ static void __meminit vmemmap_create_mapping(unsigned long start, | |||
212 | for (i = 0; i < page_size; i += PAGE_SIZE) | 212 | for (i = 0; i < page_size; i += PAGE_SIZE) |
213 | BUG_ON(map_kernel_page(start + i, phys, flags)); | 213 | BUG_ON(map_kernel_page(start + i, phys, flags)); |
214 | } | 214 | } |
215 | |||
216 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
217 | static void vmemmap_remove_mapping(unsigned long start, | ||
218 | unsigned long page_size) | ||
219 | { | ||
220 | } | ||
221 | #endif | ||
215 | #else /* CONFIG_PPC_BOOK3E */ | 222 | #else /* CONFIG_PPC_BOOK3E */ |
216 | static void __meminit vmemmap_create_mapping(unsigned long start, | 223 | static void __meminit vmemmap_create_mapping(unsigned long start, |
217 | unsigned long page_size, | 224 | unsigned long page_size, |
@@ -223,6 +230,21 @@ static void __meminit vmemmap_create_mapping(unsigned long start, | |||
223 | mmu_kernel_ssize); | 230 | mmu_kernel_ssize); |
224 | BUG_ON(mapped < 0); | 231 | BUG_ON(mapped < 0); |
225 | } | 232 | } |
233 | |||
234 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
235 | extern int htab_remove_mapping(unsigned long vstart, unsigned long vend, | ||
236 | int psize, int ssize); | ||
237 | |||
238 | static void vmemmap_remove_mapping(unsigned long start, | ||
239 | unsigned long page_size) | ||
240 | { | ||
241 | int mapped = htab_remove_mapping(start, start + page_size, | ||
242 | mmu_vmemmap_psize, | ||
243 | mmu_kernel_ssize); | ||
244 | BUG_ON(mapped < 0); | ||
245 | } | ||
246 | #endif | ||
247 | |||
226 | #endif /* CONFIG_PPC_BOOK3E */ | 248 | #endif /* CONFIG_PPC_BOOK3E */ |
227 | 249 | ||
228 | struct vmemmap_backing *vmemmap_list; | 250 | struct vmemmap_backing *vmemmap_list; |