summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2017-11-27 21:51:04 +0100
committerTejun Heo <tj@kernel.org>2017-11-27 21:53:12 +0100
commitabee210500ed15a22787009d9210b9a34911afcc (patch)
treef9f88e73a2484cf183996dd13ad461f982d4f50d /mm
parentLinux 4.15-rc1 (diff)
downloadlinux-abee210500ed15a22787009d9210b9a34911afcc.tar.xz
linux-abee210500ed15a22787009d9210b9a34911afcc.zip
percpu: hack to let the CRIS architecture to boot until they clean up
Commit 438a506180 ("percpu: don't forget to free the temporary struct pcpu_alloc_info") uncovered a problem on the CRIS architecture where the bootmem allocator is initialized with virtual addresses. Given it has: #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) then things just work out because the end result is the same whether you give this a physical or a virtual address. Untill you call memblock_free_early(__pa(address)) that is, because values from __pa() don't match with the virtual addresses stuffed in the bootmem allocator anymore. Avoid freeing the temporary pcpu_alloc_info memory on that architecture until they fix things up to let the kernel boot like it did before. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 438a506180 ("percpu: don't forget to free the temporary struct pcpu_alloc_info")
Diffstat (limited to 'mm')
-rw-r--r--mm/percpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index 79e3549cab0f..50e7fdf84055 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -2719,7 +2719,11 @@ void __init setup_per_cpu_areas(void)
if (pcpu_setup_first_chunk(ai, fc) < 0)
panic("Failed to initialize percpu areas.");
+#ifdef CONFIG_CRIS
+#warning "the CRIS architecture has physical and virtual addresses confused"
+#else
pcpu_free_alloc_info(ai);
+#endif
}
#endif /* CONFIG_SMP */