Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1935812pxb; Fri, 24 Sep 2021 15:45:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNBtjp2aDFS2b0wa0AqbXNZs6PbHuUw5SMChWCXx8xy61M8xHWbbEZEl+EyJ8/q8AnIUnY X-Received: by 2002:a05:6e02:551:: with SMTP id i17mr10236555ils.281.1632523501478; Fri, 24 Sep 2021 15:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632523501; cv=none; d=google.com; s=arc-20160816; b=tKE2JMwBssWa3acKqdCSTLKTCzNBbrcfnkfz/kETBPUBPjWflhZuju36R7SSoSRHEc vA1wAkHqTP1buqOYe/rIq8qxQRbthVcmMwLfIK9cvy+wSLcYQl1FGB2DJQp3isWKCZN9 yM+01w5y7IJVdkmH+5XtfrHp+RNfJ5l5gcGzGfKDwyhktwTXFdlIPTFEKzgCeNUAI3Xg po8hYQu/tzIWX/5dzT+7dGbgMzvE0eUezbazG19yKxFpovWZ8b3nKE5tHI3BnPfkHTzW txsz6Iev6ftNX/BLybFp/qQOdjQfPSmTJMODJxC8TB2Kshk8soqNbBqL3woB2zuiazDG Tt1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NWi+/obJ5SRPKntuFtbOfRlh9MXiWPHJ5Z9qzdR+g9w=; b=oBCHr1eazp0FY8Kj+qG7xotDn6LUrzzTfTW8ZR5w1kaxcRJa/N0ZbgYHwnT+9Nq/rA LdiUauhj35P6winPYaTMfTuEeJoBcUwB25S0wluvRdYwm+VVJbLQavzjdTC1RSFZPi3v zp6FHotrxlKAlVoeLJWM9nMW4Q646VZmkhJR+gO+W7cucRR5uZzjwX/8dDxHODP1e2uI dpuDYb6Jt3jDx46DPfcoXfgBJGF18AOkSdR2CQW9UgK3faFm2OgDWsa21tpp/H5R6Y1c 1hf1sJYF6fxhg7d6XQFEPr0K/8an7qt36fvrwihAzd+DNCQ9ETOO5JdfSzGghpnK7P3G 1fcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=pgS08UP8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si9318523ilq.163.2021.09.24.15.44.50; Fri, 24 Sep 2021 15:45:01 -0700 (PDT) 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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=pgS08UP8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343936AbhIXUyl (ORCPT + 99 others); Fri, 24 Sep 2021 16:54:41 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:36912 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232123AbhIXUyk (ORCPT ); Fri, 24 Sep 2021 16:54:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1632516787; x=1664052787; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NWi+/obJ5SRPKntuFtbOfRlh9MXiWPHJ5Z9qzdR+g9w=; b=pgS08UP88HxYm/8iRmRD5YTagj373aMBuujMqyV6FV89nfkef8pqMPQO a2ERtLzTelTjkNyhnkXezyn7uU/PuN2Gwj8ZdalQxVonqUnUBbkfbnviU oJ+FwYnq62BFHXjTNgi3x4Dv9b6NlmYNdjlNxk1sPkOQ6PgEBicU9iaLa s=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 24 Sep 2021 13:53:06 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 13:53:06 -0700 Received: from hu-cgoldswo-sd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Fri, 24 Sep 2021 13:53:05 -0700 Date: Fri, 24 Sep 2021 13:52:58 -0700 From: Chris Goldsworthy To: David Hildenbrand CC: Florian Fainelli , Chris Goldsworthy , Catalin Marinas , "Will Deacon" , Andrew Morton , , , , Sudarshan Rajagopalan , "Doug Berger" Subject: Re: [RFC] arm64: mm: update max_pfn after memory hotplug Message-ID: <20210924205258.GA17966@hu-cgoldswo-sd.qualcomm.com> References: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> <6eb8319d-acba-b69a-5db3-5dca9ef426e8@gmail.com> <41789cad-76c6-0ea5-4aa1-3e4a52acff86@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <41789cad-76c6-0ea5-4aa1-3e4a52acff86@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the response David. On Fri, Sep 24, 2021 at 10:17:46AM +0200, David Hildenbrand wrote: > no-map means that no direct mapping is to be created, right? We would still > have a memmap IIRC, and the pages are PG_reserved. > > Again, I think this is very similar to just having no-map regions like > random memory holes within the existing memory layout. For those curious, see __reserved_mem_alloc_size() > early_init_dt_alloc_reserved_memory_arch() > memblock_mark_nomap() - the 'no-map' attribute is read in __reserved_mem_alloc_size() and the pre-requisite steps need to have the relevant struct pages marked as PG_reserved are taken in memblock_mark_nomap(). > What Chris proposes here is very similar to > arch/x86/mm/init_64.c:update_end_of_memory_vars() called during > arch_add_memory()->add_pages() on x86-64. > For other's reference, the patch was derived from what x86 is doing with max_pfn (such that we also set max_low_pfn as is done in arm64's mm/init.c.