From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B7F7C433F5 for ; Thu, 7 Apr 2022 10:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244472AbiDGKhB (ORCPT ); Thu, 7 Apr 2022 06:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244443AbiDGKgU (ORCPT ); Thu, 7 Apr 2022 06:36:20 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4AF5EF3A52; Thu, 7 Apr 2022 03:33:15 -0700 (PDT) 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 1A46312FC; Thu, 7 Apr 2022 03:33:15 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.36.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4DF943F5A1; Thu, 7 Apr 2022 03:33:11 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: Anshuman Khandual , Christoph Hellwig , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot() Date: Thu, 7 Apr 2022 16:02:51 +0530 Message-Id: <20220407103251.1209606-8-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407103251.1209606-1-anshuman.khandual@arm.com> References: <20220407103251.1209606-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are no platforms left which use arch_vm_get_page_prot(). Just drop generic arch_vm_get_page_prot(). Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- include/linux/mman.h | 4 ---- mm/mmap.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mman.h b/include/linux/mman.h index b66e91b8176c..58b3abd457a3 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -93,10 +93,6 @@ static inline void vm_unacct_memory(long pages) #define arch_calc_vm_flag_bits(flags) 0 #endif -#ifndef arch_vm_get_page_prot -#define arch_vm_get_page_prot(vm_flags) __pgprot(0) -#endif - #ifndef arch_validate_prot /* * This is called from mprotect(). PROT_GROWSDOWN and PROT_GROWSUP have diff --git a/mm/mmap.c b/mm/mmap.c index edf2a5e38f4d..db7f33154206 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -110,8 +110,7 @@ pgprot_t protection_map[16] __ro_after_init = { pgprot_t vm_get_page_prot(unsigned long vm_flags) { pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) | - pgprot_val(arch_vm_get_page_prot(vm_flags))); + (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)])); return ret; } -- 2.25.1