diff options
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 14 | ||||
-rw-r--r-- | include/asm-powerpc/sparsemem.h | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index c2e5f61788b0..2f3dfcc7cdd3 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -192,7 +192,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
192 | return ret < 0 ? ret : 0; | 192 | return ret < 0 ? ret : 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | static void htab_remove_mapping(unsigned long vstart, unsigned long vend, | 195 | static int htab_remove_mapping(unsigned long vstart, unsigned long vend, |
196 | int psize, int ssize) | 196 | int psize, int ssize) |
197 | { | 197 | { |
198 | unsigned long vaddr; | 198 | unsigned long vaddr; |
@@ -202,12 +202,15 @@ static void htab_remove_mapping(unsigned long vstart, unsigned long vend, | |||
202 | step = 1 << shift; | 202 | step = 1 << shift; |
203 | 203 | ||
204 | if (!ppc_md.hpte_removebolted) { | 204 | if (!ppc_md.hpte_removebolted) { |
205 | printk("Sub-arch doesn't implement hpte_removebolted\n"); | 205 | printk(KERN_WARNING "Platform doesn't implement " |
206 | return; | 206 | "hpte_removebolted\n"); |
207 | return -EINVAL; | ||
207 | } | 208 | } |
208 | 209 | ||
209 | for (vaddr = vstart; vaddr < vend; vaddr += step) | 210 | for (vaddr = vstart; vaddr < vend; vaddr += step) |
210 | ppc_md.hpte_removebolted(vaddr, psize, ssize); | 211 | ppc_md.hpte_removebolted(vaddr, psize, ssize); |
212 | |||
213 | return 0; | ||
211 | } | 214 | } |
212 | 215 | ||
213 | static int __init htab_dt_scan_seg_sizes(unsigned long node, | 216 | static int __init htab_dt_scan_seg_sizes(unsigned long node, |
@@ -454,9 +457,10 @@ void create_section_mapping(unsigned long start, unsigned long end) | |||
454 | mmu_linear_psize, mmu_kernel_ssize)); | 457 | mmu_linear_psize, mmu_kernel_ssize)); |
455 | } | 458 | } |
456 | 459 | ||
457 | void remove_section_mapping(unsigned long start, unsigned long end) | 460 | int remove_section_mapping(unsigned long start, unsigned long end) |
458 | { | 461 | { |
459 | htab_remove_mapping(start, end, mmu_linear_psize, mmu_kernel_ssize); | 462 | return htab_remove_mapping(start, end, mmu_linear_psize, |
463 | mmu_kernel_ssize); | ||
460 | } | 464 | } |
461 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 465 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
462 | 466 | ||
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h index c5acf4ccf571..9aea8e9f0bd1 100644 --- a/include/asm-powerpc/sparsemem.h +++ b/include/asm-powerpc/sparsemem.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #ifdef CONFIG_MEMORY_HOTPLUG | 16 | #ifdef CONFIG_MEMORY_HOTPLUG |
17 | extern void create_section_mapping(unsigned long start, unsigned long end); | 17 | extern void create_section_mapping(unsigned long start, unsigned long end); |
18 | extern void remove_section_mapping(unsigned long start, unsigned long end); | 18 | extern int remove_section_mapping(unsigned long start, unsigned long end); |
19 | #ifdef CONFIG_NUMA | 19 | #ifdef CONFIG_NUMA |
20 | extern int hot_add_scn_to_nid(unsigned long scn_addr); | 20 | extern int hot_add_scn_to_nid(unsigned long scn_addr); |
21 | #else | 21 | #else |