Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp58811iog; Thu, 23 Jun 2022 22:23:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTkbCc9xyMog1ql3bBFcBTw3jYDBOm2wH7+AI2++agi42ojeMm04LN/6Jr1I6atMxgpg1T X-Received: by 2002:aa7:c803:0:b0:435:6522:c3cc with SMTP id a3-20020aa7c803000000b004356522c3ccmr15232425edt.75.1656048193109; Thu, 23 Jun 2022 22:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656048193; cv=none; d=google.com; s=arc-20160816; b=ZBCc/cCfh1IMFmDTJM/6LfQVMTOpsJasBRTFUcTjYRg2GAEZGXPd/ATjjA4QaatcmS 9jY04sMe7+NbrLJfmLKJntCzBxvWzfE2u8nHMOawNUyhx+UzxQ2viOe043oFPTvaXdh1 OaIucMw2iTAwVprViTYYCeBMrSPN6bxhpGyFMPfLTmdN0vZbJ8NvvBlobQMpGrDEvNKL XCJ/Trwcr+/FqpTaBjdUaDdEYysT07aAUQsGisW5Meh6R5QYDTmpjCQwKLB8YXfk63vX QY1T0GvhxyvX/9s+e4I/ahAwWb/ks+9uunuO4JZhmS/5ZjS3/oYbEObEnxNXXHwiMSep 7kqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ItW/ReTRAjU8HlFxrM0oB57SAs4jmC4F39d/zTQvVsw=; b=qTJ6nILRQqx91BzAiWvyzzdIJv5QaJ5MZtWF4u09fUL64HXwP+018DQZG4HeM5ja6W Z12s4Csi6fLftaYC/nismD0B+iX/tUVWX8x4WALcK4NxBAiszlDVDamz5hYJOeyhbRwl 0mE07OxdzBjfvgdrPK2W0VDHLeh6FuAZp/8gSp0t2jE9NkEMaeWypDI7HHOU1OO9/QRd WYjT/PP7fLpFViRYjE/b/+Us91uWct7txmQ3F1tLPfinB7ro0DECQGwHxSL0v9BWdnrS HTRbw77BMm8ZTgDOL+mmZAizjOCCsigN9VimEW6sJC6Znvewf3Ry6+Z+tTshzHFGqYw1 x35g== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a170906128f00b00712014b6313si1405667ejb.197.2022.06.23.22.22.48; Thu, 23 Jun 2022 22:23:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230160AbiFXFUr (ORCPT + 99 others); Fri, 24 Jun 2022 01:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiFXFUo (ORCPT ); Fri, 24 Jun 2022 01:20:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3280367E79; Thu, 23 Jun 2022 22:20:44 -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 1BB59176A; Thu, 23 Jun 2022 22:20:44 -0700 (PDT) Received: from [10.162.41.7] (unknown [10.162.41.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB2DF3F66F; Thu, 23 Jun 2022 22:20:36 -0700 (PDT) Message-ID: <33bdac1e-207a-192b-bf43-818abfa49fe1@arm.com> Date: Fri, 24 Jun 2022 10:50:33 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V4 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms Content-Language: en-US To: Christoph Hellwig Cc: linux-mm@kvack.org, christophe.leroy@csgroup.eu, Andrew Morton , linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, x86@kernel.org, openrisc@lists.librecores.org, linux-xtensa@linux-xtensa.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-parisc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-um@lists.infradead.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220624044339.1533882-1-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,SUSPICIOUS_RECIPS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 6/24/22 10:42, Christoph Hellwig wrote: > On Fri, Jun 24, 2022 at 10:13:13AM +0530, Anshuman Khandual wrote: >> vm_get_page_prot(), in order for it to be reused on platforms that do not >> require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just >> be dropped, as all platforms now define and export vm_get_page_prot(), via >> looking up a private and static protection_map[] array. protection_map[] >> data type is the following for all platforms without deviation (except the >> powerpc one which is shared between 32 and 64 bit platforms), keeping it >> unchanged for now. >> >> static pgprot_t protection_map[16] __ro_after_init > > On most architectures this should be const now, only very few ever > modify it. Will make it a 'static const pgprot_t protection_map[16] __ro_after_init' on platforms that do not change the protection_map[] even during boot.