Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp35540pxh; Thu, 7 Apr 2022 13:11:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbou5nz1KM+cgmgO67uuEk6BomdDvb/siNBtJokWvb8zQ9Hvy/MF3KeDdlpQJXdSxDJq+V X-Received: by 2002:a05:6a00:890:b0:4f6:686e:a8a9 with SMTP id q16-20020a056a00089000b004f6686ea8a9mr15923580pfj.83.1649362285736; Thu, 07 Apr 2022 13:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649362285; cv=none; d=google.com; s=arc-20160816; b=mohPuNbej+tSm44YDT1tEkiHiDQ1H5HK2xcCYLu3BaI9ax4hnVN4cnk4KPxCp8Llic jbZDqpU8GT7VoWkiPuRj4vKeFudmC/ZciMW/yhffdWO6O4OICMoIM1EOIZbqF/A4WgKl Qo3uptfLweOcnRkicCWz13bnWlYFOOuVM6J/Bcrps1xfsAKmjzkv29cliYGKFaPAPbfb 6NvpzPXAOeI00lUsxGpWuvFI+jGjZTihFpVUJGgxSno/aH8KbF8smogYvylZidxMXyPz yyPjOmw537DJdTVok5fSlvzRBJ8VVhVuoytHg574oSVs8PSvJD1r9oMI1oR8jK4rIwyI 7J9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2ODbtYF1AGU3tKkCo4Cj109SZ095IArTcEOkUtFtgx4=; b=PYwRHewqNitFJxMp5rUIwttXSq36KeDKc5rCOxtckgCOIqQ0gbeG/oUZ9Txunv2kvx Lf4s5dhyEy+IPQFEkYCCCteK7Y5NzNQGe6lE/TXK47z4b1xaj//fNZE0mnnsyc4Lq+J0 FjFURF21ah2sVVg5b+yXF53kicL4IicFUQw+nwnhS3B6B9kDyX0dLPaWF9nnUq9e08QW 3hmsbstM2XQSBYlM3Zj6zDPcRA38y+chfW0YaXlR87fB2lm+VoGfUTMh1B1vP1dn+G2X cgimHxZa+XlLBja8MHmvnU+8qBrVjRb/ftOCRpORypbUspEZvRW9ZfS8EfY9tnMAZx/M 4ZpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b5-20020a170902d50500b00154a965e488si661845plg.237.2022.04.07.13.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B36E42C49A1; Thu, 7 Apr 2022 12:33:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244458AbiDGKg7 (ORCPT + 99 others); Thu, 7 Apr 2022 06:36:59 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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