aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hash_utils_64.c6
-rw-r--r--arch/powerpc/mm/mem.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 1f8b2a05e3d0..1628201c8cea 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -531,11 +531,11 @@ static unsigned long __init htab_get_table_size(void)
531} 531}
532 532
533#ifdef CONFIG_MEMORY_HOTPLUG 533#ifdef CONFIG_MEMORY_HOTPLUG
534void create_section_mapping(unsigned long start, unsigned long end) 534int create_section_mapping(unsigned long start, unsigned long end)
535{ 535{
536 BUG_ON(htab_bolt_mapping(start, end, __pa(start), 536 return htab_bolt_mapping(start, end, __pa(start),
537 pgprot_val(PAGE_KERNEL), mmu_linear_psize, 537 pgprot_val(PAGE_KERNEL), mmu_linear_psize,
538 mmu_kernel_ssize)); 538 mmu_kernel_ssize);
539} 539}
540 540
541int remove_section_mapping(unsigned long start, unsigned long end) 541int remove_section_mapping(unsigned long start, unsigned long end)
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index ad9cf49dfb89..5db316cad47b 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -123,7 +123,8 @@ int arch_add_memory(int nid, u64 start, u64 size)
123 pgdata = NODE_DATA(nid); 123 pgdata = NODE_DATA(nid);
124 124
125 start = (unsigned long)__va(start); 125 start = (unsigned long)__va(start);
126 create_section_mapping(start, start + size); 126 if (create_section_mapping(start, start + size))
127 return -EINVAL;
127 128
128 /* this should work for most non-highmem platforms */ 129 /* this should work for most non-highmem platforms */
129 zone = pgdata->node_zones; 130 zone = pgdata->node_zones;