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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E56C5C433EF for ; Fri, 24 Sep 2021 20:55:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A845560F13 for ; Fri, 24 Sep 2021 20:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A845560F13 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nv4M3UDCP3FZ5nBrkEJ2yLSD0AK9vGxyLCIBlUheD94=; b=aArzhjzFIUh1Ma ONjmX6AtKs3LFg0/RXwNAKVRFJ8aPEPRkjUhm6v3PMmKxLaNg2v+aWM5WYRcmCk+XglKwoCL2JGC8 niPj7fdVRYAyi9jvX6VeQyQSToyk1RLiUYC81U8AfvcF0c1+OqubIXf9oq8ky9HifBWS7iJTgeg+U D9JN0+BujU4zBA3iFwrhwP35mxE5gwCw/wDYLTfEQxZ/xWK2msQOYmQCYQksl9MDKq79S2WX+PJXm 0HGRyXu7NyfKzkgow+nEgFNdAUiPymjTSm7HBn7IXUp/xxuf8qvdZZfeskQPpVsILZTgIxDrbz+zl 5ZJ0qu7wRn6zbkU6pFnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTsC2-00FVJ4-9W; Fri, 24 Sep 2021 20:53:14 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTsBy-00FVHr-49 for linux-arm-kernel@lists.infradead.org; Fri, 24 Sep 2021 20:53:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1632516790; x=1664052790; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NWi+/obJ5SRPKntuFtbOfRlh9MXiWPHJ5Z9qzdR+g9w=; b=D74vZ536sxYSInbyk9FaJtfxeLgb48TQuWDfKJ3uL45yWS8y+Xc+hMu7 RQgciYZ5L7awHfTtbxFxFMwKHAU+WstSb2aIcGEyZJX7C9ANCR9CsavY6 KWFzsScWAkuIayKxgnCkUUDiUk0DQrA2JYR2tESDVxw3T6WU8Dzf9UYxW 8=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 24 Sep 2021 13:53:07 -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-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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_135310_251028_B1D0CB16 X-CRM114-Status: GOOD ( 13.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel