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 CB708C433EF for ; Mon, 27 Sep 2021 15:54:03 +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 88EB16044F for ; Mon, 27 Sep 2021 15:54:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88EB16044F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cAbF1fWLt+sJKP5X2IGRpxi7oTza2VqRZsKXsZRq0WM=; b=YoQskhBMY67MdXQnaL9VmCISDJ wFu6Xwi12mhf8FULe9EU2lqwTCDA1svzx9uRas49DjnyUQgBxLUFV2bRGnIZWeEtBF6kSR2aVIwNR bVRdFG8MZzHZvcrW4AAkZhbLuKJqftJVhCtNBAZMqEeQXfntsxFMeHW4wMnyA7P6ahePuiVYe+p9E St2cGyk0AR2RWBNkpMRp/BENXzXTR1Hs03BdizeQFU4HOafZZxMgzo0N9WFZLR8xXIH3mJNT83WIY q+TLDvQHxqYfNuHu3CJ7LYvNv5YOdL+n/ZFDs184leifIl45/3a9aHVrK70ZB9bBD3qxJ9XSKyYeU kWl1ft3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUsv2-003GPm-1c; Mon, 27 Sep 2021 15:51:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUsuw-003GMv-Do for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 15:51:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632757905; h=from:from: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; bh=/vgpSXmiTJjoeFVzvxVktr7agfW9UwhR9y61Ap04cEk=; b=dg1M2tErlrZL2UZ5+qxSyU5xjL8aS4sHgpfmVyOJkzXV1pI0ndsuPWoivZDw3tPzH8BXZl 4S0xqe6bP55zgTmhwosxquGEXko+B4gSzRRatp1PJdFXFlgVYQc8fU5BfRFX4vDelcIvs+ tsWM13zYfxvKZN97Otj07X9rqusWaXU= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-tMyH0wmSN42jGYKctGDC5Q-1; Mon, 27 Sep 2021 11:51:44 -0400 X-MC-Unique: tMyH0wmSN42jGYKctGDC5Q-1 Received: by mail-wr1-f71.google.com with SMTP id x7-20020a5d6507000000b0015dada209b1so14219025wru.15 for ; Mon, 27 Sep 2021 08:51:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=/vgpSXmiTJjoeFVzvxVktr7agfW9UwhR9y61Ap04cEk=; b=qhEjkfbxwMZXNBzPEdX7jQwiV+nSugkCKbjE7u2BbRskWWGStaSAupYDeJVkoa/FZ5 F4Qd2nPf9pMVmW+tZXs/lmN/+EHl5lkBXNVl8Ev05/vKrw6RRdgm+tZI6hsisx3z6DjT fru+ka86rIwd7PNcG6GK/94VLFnDTQvKc+XHbd5SUJk5qsw6HwLrT+RP2OpoZ0lg7ETT R4JGABSHHqz5w8rDQGhRkcGJR5y+unGGVEfPd2zYUJAeBP3kUPjHjus+zW2lfvl6YySI j+OxhNuTbLthIt7DyULt3YSPKRHCINc1eF8cdjpZDSuhEyovwZnelcJpJpDGU23EkZvZ bZPQ== X-Gm-Message-State: AOAM530cWJwjkdXY9x/VXWPiRMxfiFxrruOQhJ6KyK4t687cm5EWg8rD jPTI5/OPDEULlQ0KRCzGiCDFs/uUyxwbqL/p7sAYFTuhc/QX98SwsQQdV2KEEpuWGjKZTqsuzzg myTsG/qXuuwxFJZ/uw1Euq5mLKIW8F2UgWko= X-Received: by 2002:a1c:a78d:: with SMTP id q135mr685572wme.36.1632757903078; Mon, 27 Sep 2021 08:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWTyyR4BQrL35V7YoVFE/8tnjzyceGwJuLvzKyMN+8BuumNqGsYOneMg0dw3n5qeSkT146PA== X-Received: by 2002:a1c:a78d:: with SMTP id q135mr685553wme.36.1632757902915; Mon, 27 Sep 2021 08:51:42 -0700 (PDT) Received: from [192.168.3.132] (p5b0c654d.dip0.t-ipconnect.de. [91.12.101.77]) by smtp.gmail.com with ESMTPSA id c18sm9623733wmb.27.2021.09.27.08.51.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 08:51:42 -0700 (PDT) Subject: Re: [RFC] arm64: mm: update max_pfn after memory hotplug To: Chris Goldsworthy , Catalin Marinas , Will Deacon , Andrew Morton Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sudarshan Rajagopalan References: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> From: David Hildenbrand Organization: Red Hat Message-ID: <833493d2-d585-47ee-c258-79eae5deff36@redhat.com> Date: Mon, 27 Sep 2021 17:51:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210927_085146_602603_31987F87 X-CRM114-Status: GOOD ( 18.76 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 24.09.21 00:54, Chris Goldsworthy wrote: > From: Sudarshan Rajagopalan > > After new memory blocks have been hotplugged, max_pfn and max_low_pfn > needs updating to reflect on new PFNs being hot added to system. > > Signed-off-by: Sudarshan Rajagopalan > Signed-off-by: Chris Goldsworthy > --- > arch/arm64/mm/mmu.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index cfd9deb..fd85b51 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -1499,6 +1499,11 @@ int arch_add_memory(int nid, u64 start, u64 size, > if (ret) > __remove_pgd_mapping(swapper_pg_dir, > __phys_to_virt(start), size); > + else { > + max_pfn = PFN_UP(start + size); > + max_low_pfn = max_pfn; > + } > + > return ret; Note: didn't verify if updating max_low_pfn is correct here. Acked-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel