aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r--arch/powerpc/mm/mem.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f6787f90e158..cd525d709072 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -54,7 +54,7 @@
54#include <asm/swiotlb.h> 54#include <asm/swiotlb.h>
55#include <asm/rtas.h> 55#include <asm/rtas.h>
56 56
57#include "mmu_decl.h" 57#include <mm/mmu_decl.h>
58 58
59#ifndef CPU_FTR_COHERENT_ICACHE 59#ifndef CPU_FTR_COHERENT_ICACHE
60#define CPU_FTR_COHERENT_ICACHE 0 /* XXX for now */ 60#define CPU_FTR_COHERENT_ICACHE 0 /* XXX for now */
@@ -109,8 +109,8 @@ int __weak remove_section_mapping(unsigned long start, unsigned long end)
109 return -ENODEV; 109 return -ENODEV;
110} 110}
111 111
112int __meminit arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, 112int __ref arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
113 bool want_memblock) 113 bool want_memblock)
114{ 114{
115 unsigned long start_pfn = start >> PAGE_SHIFT; 115 unsigned long start_pfn = start >> PAGE_SHIFT;
116 unsigned long nr_pages = size >> PAGE_SHIFT; 116 unsigned long nr_pages = size >> PAGE_SHIFT;
@@ -131,8 +131,8 @@ int __meminit arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *
131} 131}
132 132
133#ifdef CONFIG_MEMORY_HOTREMOVE 133#ifdef CONFIG_MEMORY_HOTREMOVE
134int __meminit arch_remove_memory(int nid, u64 start, u64 size, 134int __ref arch_remove_memory(int nid, u64 start, u64 size,
135 struct vmem_altmap *altmap) 135 struct vmem_altmap *altmap)
136{ 136{
137 unsigned long start_pfn = start >> PAGE_SHIFT; 137 unsigned long start_pfn = start >> PAGE_SHIFT;
138 unsigned long nr_pages = size >> PAGE_SHIFT; 138 unsigned long nr_pages = size >> PAGE_SHIFT;
@@ -161,7 +161,8 @@ int __meminit arch_remove_memory(int nid, u64 start, u64 size,
161 */ 161 */
162 vm_unmap_aliases(); 162 vm_unmap_aliases();
163 163
164 resize_hpt_for_hotplug(memblock_phys_mem_size()); 164 if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
165 pr_warn("Hash collision while resizing HPT\n");
165 166
166 return ret; 167 return ret;
167} 168}
@@ -309,6 +310,10 @@ void __init mem_init(void)
309 mem_init_print_info(NULL); 310 mem_init_print_info(NULL);
310#ifdef CONFIG_PPC32 311#ifdef CONFIG_PPC32
311 pr_info("Kernel virtual memory layout:\n"); 312 pr_info("Kernel virtual memory layout:\n");
313#ifdef CONFIG_KASAN
314 pr_info(" * 0x%08lx..0x%08lx : kasan shadow mem\n",
315 KASAN_SHADOW_START, KASAN_SHADOW_END);
316#endif
312 pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); 317 pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP);
313#ifdef CONFIG_HIGHMEM 318#ifdef CONFIG_HIGHMEM
314 pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n", 319 pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n",