Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3518366pxb; Mon, 24 Jan 2022 11:14:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLVLiEejOR9bGOeUASh0OF1G5tkvNvP4rQckMeoE9DanTejT5CVLU7QC3oQC8wvNLPse3Q X-Received: by 2002:a17:902:be11:b0:149:5e5e:7b10 with SMTP id r17-20020a170902be1100b001495e5e7b10mr16264946pls.75.1643051665621; Mon, 24 Jan 2022 11:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643051665; cv=none; d=google.com; s=arc-20160816; b=tmPv/g+u3DZKNIq2684jlu5QGZVxrpw7c/e4O69qbRDlWxfwhieF1BLjaJ0ry3TF9m ExLjTakwaVpXtngG+HVWftI6jgbcxtEM81xG0BUr5nZyYCqrCU35N1rqS3UZ7O/KAxyb iBhv/X/OljalypOWnd/GNAfw2RO8zsjjfPycECSAPylK+OklVjTTepkR9Gu2DehGr90F HGD7xnxwAL3PPEuF93vFziv1nyR8R5MSZecV9Bri90GUeMa0nS+gf5DF5JLi3L1aMXUf 8z3BOVLZuONU+hiKxl4e7hortRo0TDGQR6VMFtQNH5ZZN/a6IrnOXQOkjtCGTGFmQTtF Opqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=trNSe1FJldqhGGIAixtTU7JYPneEIsVgtLQSaCtSqv4=; b=UF8reqKrLkp1KPcd7ltp9mVAEsorigiDsL9cEyD6TK3rW5qAls3SNNlJksoIV3wozC 4xufX6KAiXe5cf3Pfwye1Rfc+XPBLH6jfEhngP0g6z/1vEGyCngGQtdXAJuHyZoHtELL xeuqFd6J127czAxgM6Ccqo0CwwYPddOo8Qr9LgcblfqaXnzW772K6H/QLRMFp7oeTFyJ 7iIJ0dEfKGVn3wntnuXppkfRyLrzVwhfgTTO+FinO/LBgqQPwhoNKTBlBWNH/LkMPler ELCjSxnQh9spu3WQXY3Il/njpla/FdqH38zmvJU7Pgh1M7pX/MaE/jhuYBVw44YzgJDr ehYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si16506071pfj.37.2022.01.24.11.14.13; Mon, 24 Jan 2022 11:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242759AbiAXM6E (ORCPT + 99 others); Mon, 24 Jan 2022 07:58:04 -0500 Received: from foss.arm.com ([217.140.110.172]:33006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242764AbiAXM55 (ORCPT ); Mon, 24 Jan 2022 07:57:57 -0500 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 99639101E; Mon, 24 Jan 2022 04:57:57 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.43.190]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 163A53F774; Mon, 24 Jan 2022 04:57:54 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, hch@infradead.org, akpm@linux-foundation.org, Anshuman Khandual Subject: [RFC V1 12/31] mm/mmap: Drop arch_filter_pgprot() Date: Mon, 24 Jan 2022 18:26:49 +0530 Message-Id: <1643029028-12710-13-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643029028-12710-1-git-send-email-anshuman.khandual@arm.com> References: <1643029028-12710-1-git-send-email-anshuman.khandual@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ -- 2.25.1