From patchwork Mon Feb 14 02:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 12744804 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 A3902C433F5 for ; Mon, 14 Feb 2022 02:31:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 342C36B0089; Sun, 13 Feb 2022 21:31:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F1BD6B008A; Sun, 13 Feb 2022 21:31:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B8D56B008C; Sun, 13 Feb 2022 21:31:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 0A13C6B0089 for ; Sun, 13 Feb 2022 21:31:41 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C6E32203AE for ; Mon, 14 Feb 2022 02:31:40 +0000 (UTC) X-FDA: 79139809560.02.A388674 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf23.hostedemail.com (Postfix) with ESMTP id 56BDE140006 for ; Mon, 14 Feb 2022 02:31:40 +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 D18941424; Sun, 13 Feb 2022 18:31:39 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.47.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CD3963F718; Sun, 13 Feb 2022 18:31:37 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Anshuman Khandual , Christoph Hellwig , Andrew Morton , linux-arch@vger.kernel.org Subject: [PATCH 12/30] mm/mmap: Drop arch_filter_pgprot() Date: Mon, 14 Feb 2022 08:00:35 +0530 Message-Id: <1644805853-21338-13-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644805853-21338-1-git-send-email-anshuman.khandual@arm.com> References: <1644805853-21338-1-git-send-email-anshuman.khandual@arm.com> X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 56BDE140006 X-Stat-Signature: z8hyb9oiexhnht948uodzuwrqjkg1obn Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf23.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-HE-Tag: 1644805900-383336 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: There are no platforms left which subscribe ARCH_HAS_FILTER_PGPROT. Hence just drop arch_filter_pgprot() and also the config ARCH_HAS_FILTER_PGPROT. Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- mm/Kconfig | 3 --- mm/mmap.c | 10 +--------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index fa436478a94c..212fb6e1ddaa 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -744,9 +744,6 @@ config IDLE_PAGE_TRACKING config ARCH_HAS_CACHE_LINE_SIZE bool -config ARCH_HAS_FILTER_PGPROT - bool - config ARCH_HAS_VM_GET_PAGE_PROT bool diff --git a/mm/mmap.c b/mm/mmap.c index f61f74a61f62..70a75ea91e94 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -102,14 +102,6 @@ static void unmap_region(struct mm_struct *mm, * w: (no) no * x: (yes) yes */ - -#ifndef CONFIG_ARCH_HAS_FILTER_PGPROT -static inline pgprot_t arch_filter_pgprot(pgprot_t prot) -{ - return prot; -} -#endif - static inline pgprot_t __vm_get_page_prot(unsigned long vm_flags) { switch (vm_flags & (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)) { @@ -155,7 +147,7 @@ pgprot_t vm_get_page_prot(unsigned long vm_flags) pgprot_t ret = __pgprot(pgprot_val(__vm_get_page_prot(vm_flags)) | pgprot_val(arch_vm_get_page_prot(vm_flags))); - return arch_filter_pgprot(ret); + return ret; } EXPORT_SYMBOL(vm_get_page_prot); #endif /* CONFIG_ARCH_HAS_VM_GET_PAGE_PROT */