From patchwork Fri Jun 3 10:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 12868932 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 1B088CCA473 for ; Fri, 3 Jun 2022 10:14:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B9F68D0002; Fri, 3 Jun 2022 06:14:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 169898D0001; Fri, 3 Jun 2022 06:14:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 02EE38D0002; Fri, 3 Jun 2022 06:14:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E3F838D0001 for ; Fri, 3 Jun 2022 06:14:29 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id B9D2B60F97 for ; Fri, 3 Jun 2022 10:14:29 +0000 (UTC) X-FDA: 79536515058.09.4823291 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf13.hostedemail.com (Postfix) with ESMTP id 6D33A2006E for ; Fri, 3 Jun 2022 10:13:54 +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 CCFAE1063; Fri, 3 Jun 2022 03:14:27 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.42.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CDDE03F766; Fri, 3 Jun 2022 03:14:18 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Michael Ellerman , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Heiko Carstens , Vasily Gorbik , Thomas Bogendoerfer , Geert Uytterhoeven , Dinh Nguyen , Jonas Bonn , Andrew Morton , x86@kernel.org, openrisc@lists.librecores.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] mm/mmap: Enable more platforms with ARCH_HAS_VM_GET_PAGE_PROT Date: Fri, 3 Jun 2022 15:44:05 +0530 Message-Id: <20220603101411.488970-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6D33A2006E X-Stat-Signature: zaktt9yusgi11wtfxraypa1n3wgn7tcx X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-HE-Tag: 1654251234-383583 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From the last discussion [1], some more platforms (s390, mips, csky, nios2, openrisc) were willing to enable ARCH_HAS_VM_GET_PAGE_PROT and also provide custom vm_get_page_prot() via switch case statement implementation without any objection. All those platform specific patches have already been acked. This series makes protection_map[] array private on platforms which define their own vm_get_page_prot() via ARCH_HAS_VM_GET_PAGE_PROT, and also drops off their __PXXX/__SXXX macros. This also enables new platforms as in this series, to drop off their __PXXX/__SXXX macros as generic protection_map[] is no longer visible to them. [1] https://lore.kernel.org/all/1646045273-9343-2-git-send-email-anshuman.khandual@arm.com/ This series applies on current mainline and also has been build tested on multiple platforms. Cc: Catalin Marinas Cc: Will Deacon Cc: Michael Ellerman Cc: Paul Mackerras Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Thomas Bogendoerfer Cc: Geert Uytterhoeven Cc: Dinh Nguyen Cc: Jonas Bonn Cc: Andrew Morton Cc: x86@kernel.org Cc: openrisc@lists.librecores.org Cc: linux-csky@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Cc: sparclinux@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (6): mm/mmap: Restrict generic protection_map[] array visibility s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT arch/arm64/include/asm/pgtable-prot.h | 18 -------- arch/arm64/mm/mmap.c | 21 ++++++++++ arch/csky/Kconfig | 1 + arch/csky/include/asm/pgtable.h | 18 -------- arch/csky/mm/init.c | 32 ++++++++++++++ arch/mips/Kconfig | 1 + arch/mips/include/asm/pgtable.h | 22 ---------- arch/mips/mm/cache.c | 60 ++++++++++++++++----------- arch/nios2/Kconfig | 1 + arch/nios2/include/asm/pgtable.h | 24 ----------- arch/nios2/mm/init.c | 47 +++++++++++++++++++++ arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/pgtable.h | 18 -------- arch/openrisc/mm/init.c | 41 ++++++++++++++++++ arch/powerpc/include/asm/pgtable.h | 2 + arch/powerpc/mm/book3s64/pgtable.c | 20 +++++++++ arch/s390/Kconfig | 1 + arch/s390/include/asm/pgtable.h | 17 -------- arch/s390/mm/mmap.c | 33 +++++++++++++++ arch/sparc/include/asm/pgtable_32.h | 2 + arch/sparc/include/asm/pgtable_64.h | 19 --------- arch/sparc/mm/init_64.c | 20 +++++++++ arch/x86/include/asm/pgtable_types.h | 19 --------- arch/x86/mm/pgprot.c | 19 +++++++++ include/linux/mm.h | 2 + mm/mmap.c | 2 +- 26 files changed, 280 insertions(+), 181 deletions(-)