From patchwork Tue Nov 30 17:29:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12647899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C63AC433EF for ; Tue, 30 Nov 2021 17:31:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC9436B0073; Tue, 30 Nov 2021 12:30:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B52386B0075; Tue, 30 Nov 2021 12:30:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F1E76B0078; Tue, 30 Nov 2021 12:30:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay025.a.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 8F7036B0073 for ; Tue, 30 Nov 2021 12:30:48 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4BB9E20588 for ; Tue, 30 Nov 2021 17:30:38 +0000 (UTC) X-FDA: 78866286072.01.817B905 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf05.hostedemail.com (Postfix) with ESMTP id 35074508DABA for ; Tue, 30 Nov 2021 17:30:27 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2BC3B1042; Tue, 30 Nov 2021 09:30:37 -0800 (PST) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C263A3F694; Tue, 30 Nov 2021 09:30:35 -0800 (PST) From: Vladimir Murzin To: linux-arch-owner@vger.kernel.org, linux-mm@kvack.org Cc: dennis@kernel.org, tj@kernel.org, cl@linux.com, akpm@linux-foundation.org, npiggin@gmail.com, hch@lst.de, arnd@arndb.de, vladimir.murzin@arm.com Subject: [PATCH] percpu: km: ensure it is used with NOMMU (either UP or SMP) Date: Tue, 30 Nov 2021 17:29:54 +0000 Message-Id: <20211130172954.129587-2-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20211130172954.129587-1-vladimir.murzin@arm.com> References: <20211130172954.129587-1-vladimir.murzin@arm.com> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 35074508DABA X-Stat-Signature: eu96enwyq53u9zdi6373hzch1bc4ttiy Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of vladimir.murzin@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vladimir.murzin@arm.com; dmarc=pass (policy=none) header.from=arm.com X-HE-Tag: 1638293427-493814 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000118, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 bbddff054587 ("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 Tested-by: Rob Landley Tested-by: Rich Felker --- mm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index d16ba92..66331e0 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -425,9 +425,8 @@ config THP_SWAP # UP and nommu archs use km based percpu allocator # config NEED_PER_CPU_KM - depends on !SMP bool - default y + default !SMP || !MMU config CLEANCACHE bool "Enable cleancache driver to cache clean pages if tmem is present"