Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1360566pxb; Fri, 21 Jan 2022 16:30:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzb33CkLTb/zJ5uCd8jxokpSCTgjieOaQfRFhJcA9ekZ0xzh4O0c5V8cKi9+t9iEr1Kxxm8 X-Received: by 2002:a63:8f4a:: with SMTP id r10mr4535549pgn.414.1642811413904; Fri, 21 Jan 2022 16:30:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642811413; cv=none; d=google.com; s=arc-20160816; b=dmdO67UZrWYOrlcxtCPqbPfX59YdNHdOP/hXDtC12mtQNcMwTnqVimKavKhhmm4pg7 qphrzrb9a4qFfMoM8iAK95YM5xcE6m7TF7DEBqlkGu2zyEjXe77S3qIPjLwG0eHl0Q3o jkse89a0+0t2xRCL6Iw2DgQNWQuGs5R5+FX08da5EVFox+HMlagNiFKZB69ah4JjX3IH 1cdtUTaTv+KdkKJGHJiF6Z3tSrjRF5X8Jpwi7xTZLmShI6Abpdcf4W+LJvGznp2z4Wkz kQSq70W1bOT0HfTzPnjaH+1teMU2WbV7auVNvOIwluxo7JIEgb5JOhtK4vFc+3+e5TCO opyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=nLCQDrQ8UvbBpcVBi5cbENFLf9jkDCnDYBSHodmLoQY=; b=C/5rAw9f2OVmjGchvrmP2Dq2K6wOpnijC6P1w8UmE/kbJklExnNOGq12rZb+iLC4uH oo1QJHACXWlg/Idy3/8ipRUVxm/zl859BaeUpcz+jZBGwk+qd7ftnorJ7tf/t/Og9xPw khMwx0IH8lczaJY56YNGR4oUZ9GhrvBF2Zv9lC0dSKTWWGymMoqVxMSxURRVbQesl4pL 7Mam05u7OAwcQBCJwZMBr4w5sihZFI9xpf4+1UDWrKDkN01hT5an9uZQQpcjNHUadChO mdLLldudRMyuACCesutbIqZMGlnuY08G3ZXygCwTXf94vtc+SN8KEuOGmdnmTjdwyWwA gdMg== 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 e2si6947900pfe.62.2022.01.21.16.30.02; Fri, 21 Jan 2022 16:30:13 -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 S1348531AbiAUC2m (ORCPT + 99 others); Thu, 20 Jan 2022 21:28:42 -0500 Received: from foss.arm.com ([217.140.110.172]:33982 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237728AbiAUC2l (ORCPT ); Thu, 20 Jan 2022 21:28:41 -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 0BF42ED1; Thu, 20 Jan 2022 18:28:41 -0800 (PST) Received: from [10.163.74.170] (unknown [10.163.74.170]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E30F3F774; Thu, 20 Jan 2022 18:28:35 -0800 (PST) Subject: Re: [PATCH 1/2] arm64: mm: apply __ro_after_init to memory_limit To: "Peng Fan (OSS)" , catalin.marinas@arm.com, will@kernel.org, rppt@kernel.org Cc: akpm@linux-foundation.org, david@redhat.com, geert+renesas@glider.be, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan References: <20211215064559.2843555-1-peng.fan@oss.nxp.com> From: Anshuman Khandual Message-ID: <3204def4-df7b-4a0c-1b8d-045ead96f0b2@arm.com> Date: Fri, 21 Jan 2022 07:58:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20211215064559.2843555-1-peng.fan@oss.nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/15/21 12:15 PM, Peng Fan (OSS) wrote: > From: Peng Fan > > This variable is only set during initialization, so mark with > __ro_after_init. > > Signed-off-by: Peng Fan > --- > arch/arm64/mm/init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index a8834434af99..db63cc885771 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -172,7 +172,7 @@ int pfn_is_map_memory(unsigned long pfn) > } > EXPORT_SYMBOL(pfn_is_map_memory); > > -static phys_addr_t memory_limit = PHYS_ADDR_MAX; > +static phys_addr_t memory_limit __ro_after_init = PHYS_ADDR_MAX; > > /* > * Limit the memory size that was specified via FDT. > Reviewed-by: Anshuman Khandual