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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFC6AC43334 for ; Thu, 16 Jun 2022 06:10:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 55C4D6B0072; Thu, 16 Jun 2022 02:10:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50BE96B0073; Thu, 16 Jun 2022 02:10:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AD436B0074; Thu, 16 Jun 2022 02:10:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2BEDA6B0072 for ; Thu, 16 Jun 2022 02:10:31 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 96A0D61345 for ; Thu, 16 Jun 2022 06:10:30 +0000 (UTC) X-FDA: 79583074620.07.8215788 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf30.hostedemail.com (Postfix) with ESMTP id 39F7A80011 for ; Thu, 16 Jun 2022 06:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=67SdYKRUCeobi2/rHNNNfjGcSSgRdxZp6RN6GJ1fkCs=; b=UlZyMgJGdvNMa/vaSP9UiiWJaV A7KSO9MNTXWK+M7ozyQzazoFEwwZZzXwS2DOZmjiCC/yw8rJJoMjdy1zTygm5fD87bqefzSnNjwK3 j+U9xLnGRGtwljMeGLNvyBx5Z43b43Ndz7WBr/0t1g2gvAo+qg0QWmgM5iCa2N38iaPuuRggT32Sa jvb0vl8mcLrcWYd6j8U3+euo2QgGuhFAj/UnAj+g3kSEWriecVG3IAgrHC2vs1ZgdlPHbHQh/z/5l ppPObL4YkMRNXiWHTyHeGW6MQeaZMrquluqlUJCp+fO3x+WQW6HWMSdrh2dXOUJz7ix2TT9CFdOnn 2knwSArQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1ii2-000gnh-OW; Thu, 16 Jun 2022 06:10:26 +0000 Date: Wed, 15 Jun 2022 23:10:26 -0700 From: "hch@infradead.org" To: Christophe Leroy Cc: Anshuman Khandual , "linux-mm@kvack.org" , "hch@infradead.org" , Andrew Morton , "linux-kernel@vger.kernel.org" , kernel test robot , Christoph Hellwig Subject: Re: [PATCH V3 2/2] mm/mmap: Drop generic protection_map[] array Message-ID: References: <20220616040924.1022607-1-anshuman.khandual@arm.com> <20220616040924.1022607-3-anshuman.khandual@arm.com> <8819cd0a-4120-9afe-e491-2843681a0e7e@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8819cd0a-4120-9afe-e491-2843681a0e7e@csgroup.eu> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655359830; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=67SdYKRUCeobi2/rHNNNfjGcSSgRdxZp6RN6GJ1fkCs=; b=XAvLIXkawwEug2BNhKE6Y6HyPlkDR7ceCwNWr1NC7dfic63s+SnWU48t0VopUn38BxI4GM hypYpmgkF0/ywvUWo5tAPaMXPdL94ZUgrKZn0NS+zLy7NsyPGFdyaup+2f7R7poKfE4C5l Q7NZvscpF3atTTn1j3rGpbf7BLNeoaA= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=UlZyMgJG; dmarc=none; spf=none (imf30.hostedemail.com: domain of BATV+c9d26d7972d0db0217a7+6871+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+c9d26d7972d0db0217a7+6871+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655359830; a=rsa-sha256; cv=none; b=tpRp+21r3ULX0BdtmbT+78NDNFVXJAFcA9KiTXyAn4on04CTqnZe9oHMafeNDb/tPIczBj mda/pzj4pmsV57LMQj6m72uaGZ/GSpOd+Z9RWwyTLEf8hUTur2pmboeTscl9NTBhr3jVMa MSMiuPzPJOw+dsPJMmyRMiRXquBQ2tQ= X-Stat-Signature: jedmc877bzk1cd9xtoqw17d7cyfiz4si X-Rspamd-Queue-Id: 39F7A80011 X-Rspam-User: X-Rspamd-Server: rspam05 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=UlZyMgJG; dmarc=none; spf=none (imf30.hostedemail.com: domain of BATV+c9d26d7972d0db0217a7+6871+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+c9d26d7972d0db0217a7+6871+infradead.org+hch@bombadil.srs.infradead.org X-HE-Tag: 1655359830-537713 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: On Thu, Jun 16, 2022 at 05:27:15AM +0000, Christophe Leroy wrote: > > > Le 16/06/2022 à 06:09, Anshuman Khandual a écrit : > > Move the protection_array[] array inside the arch for those platforms which > > s/protection_array/protection_map > > > do not enable ARCH_HAS_VM_GET_PAGE_PROT. Afterwards __SXXX/__PXX macros can > > be dropped completely which are now redundant. > > I see some protection_map[] are __ro_after_init, some not. > > I'm sure several of them could be const as they are never modified. Yes, most should be const as they are never modified. A few have init time modifications and can be __ro_after_init. If we actually have any that are modified later on that is a bug that we need to look into with the respective arch maintainers.