]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: hack to let the CRIS architecture to boot until they clean up
authorNicolas Pitre <nicolas.pitre@linaro.org>
Mon, 27 Nov 2017 20:51:04 +0000 (15:51 -0500)
committerTejun Heo <tj@kernel.org>
Mon, 27 Nov 2017 20:53:12 +0000 (12:53 -0800)
commita820b8552736604b20d68c1984f6e4de183a867f
treef9f88e73a2484cf183996dd13ad461f982d4f50d
parentfc34a8d7a6e80eb2c2304f3fb1526e012599ae42
percpu: hack to let the CRIS architecture to boot until they clean up

Commit e481775875 ("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: e481775875 ("percpu: don't forget to free the temporary struct pcpu_alloc_info")
mm/percpu.c