Commit 3583521a authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Dennis Zhou

percpu: km: ensure it is used with NOMMU (either UP or SMP)

Currently, NOMMU pull km allocator via !SMP dependency because most of
them are UP, yet for SMP+NOMMU vm allocator gets pulled which:

* may lead to broken build [1]
* ...or not working runtime due to [2]

It looks like SMP+NOMMU case was overlooked in bbddff05 ("percpu:
use percpu allocator on UP too") so restore that.

[1]
For ARM SMP+NOMMU (R-class cores)

arm-none-linux-gnueabihf-ld: mm/percpu.o: in function `pcpu_post_unmap_tlb_flush':
mm/percpu-vm.c:188: undefined reference to `flush_tlb_kernel_range'

[2]
static inline
int vmap_pages_range_noflush(unsigned long addr, unsigned long end,
                pgprot_t prot, struct page **pages, unsigned int page_shift)
{
       return -EINVAL;
}
Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Tested-by: default avatarRob Landley <rob@landley.net>
Tested-by: default avatarRich Felker <dalias@libc.org>
[Dennis: use depends instead of default for condition]
Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
parent 0fcfb00b
...@@ -428,7 +428,7 @@ config THP_SWAP ...@@ -428,7 +428,7 @@ config THP_SWAP
# UP and nommu archs use km based percpu allocator # UP and nommu archs use km based percpu allocator
# #
config NEED_PER_CPU_KM config NEED_PER_CPU_KM
depends on !SMP depends on !SMP || !MMU
bool bool
default y default y
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment