]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: km: ensure it is used with NOMMU (either UP or SMP)
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 30 Nov 2021 17:29:54 +0000 (17:29 +0000)
committerDennis Zhou <dennis@kernel.org>
Mon, 6 Dec 2021 17:45:09 +0000 (12:45 -0500)
commit926cce7ea22612ccee8b04ad28450de729ecb470
tree8e395593ecc3082a5c4c37416a5c29227e6dbe67
parenta2200a1a728925ec7975c22ebe5470181f223449
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 80819837de63 ("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: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Rob Landley <rob@landley.net>
Tested-by: Rich Felker <dalias@libc.org>
[Dennis: use depends instead of default for condition]
Signed-off-by: Dennis Zhou <dennis@kernel.org>
mm/Kconfig