Received: by 10.213.65.68 with SMTP id h4csp815112imn; Fri, 6 Apr 2018 09:21:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/1k926jPlbgpNi5kNi/lsDxnDm56GhJnNn+zGhdW7vS+psys6XBky7onl7Mmg1jGexBTwd X-Received: by 2002:a17:902:525:: with SMTP id 34-v6mr27746503plf.267.1523031662023; Fri, 06 Apr 2018 09:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523031661; cv=none; d=google.com; s=arc-20160816; b=xAhMSucclBb7nq3/Tln0iKeBQ9pq6OVFxT9gKAppQ14XKH6t+xWZVJWy4v1zVHyj/w om5kFTqmqmrjRP54ssfNatw42MoYlP+vlyLmOiAA9IyyXaDQEobS1cVYMMoeYjZ/2dWH XWA2Xvez+TuZNodqnJAreWvSZ3KK7asVEr1jTNPKrXgZab1cqdCyTYaOA8fJ1BcVcFGQ /PAnsmdvnNsLcbW5T7srooI1W+sXNmjlMAQM+DZUwU4HnCi1ggxYsTSio8Pj7yjiBc2C eBUZQmRcFG4gxSLeSQaqk+b5AtS2hcy8uHB3lXwKTobojfJBzaylr+ptshZHs3PI5pps oWoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=he8MyWJW73IVfy85Npgcpec9x09fRSocV1U1/Ah4R3Y=; b=i5hOW/5cy03mEDvE+dImODot7h2m/HjqMI8XepOJswdcLfcEz9xm8btFtwfwgStmNd vSw/89E35jiZAgpYMI7RKOkGnDma63gqkVdX9DWum2rVjU4n/7WpxYKVgwiikl6xhg4Q UvRXOZV+g+HBbNGeRLQe9jM/HUuou2I/3lBmJvMO6WMFZFQRGmjsCWtDvwxwRwa/M90f WutDKhrZ3cBfXSOwW4wtbRiXYAvGSU5DgihSKAMRsWTSVeMsQdVZd310/eyFrkB5C2hU VBcD8C7AxXMe1mwvg3D5meh7VoRqXF9e4KQ6x4mdKSA8NpVOsoBSo6OTqjuZ85WNAF7n BRmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si7438320pgo.9.2018.04.06.09.20.22; Fri, 06 Apr 2018 09:21:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbeDFQRK (ORCPT + 99 others); Fri, 6 Apr 2018 12:17:10 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:45170 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbeDFQRJ (ORCPT ); Fri, 6 Apr 2018 12:17:09 -0400 Received: by mail-ot0-f195.google.com with SMTP id h26-v6so1736982otj.12 for ; Fri, 06 Apr 2018 09:17:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=he8MyWJW73IVfy85Npgcpec9x09fRSocV1U1/Ah4R3Y=; b=Pyypa9be4Tk4tx7ceCbC2f3Q9hfMzWN1nlnVjXUvhNdlkZQzmfq89ztSq+7lEMCxCk R0vJnNw6YT24KCo9cCF2SEjRZt9e5gPCa6VhiArSiAX+pg1APsJSbEZAg1wDVUN0y/HJ x8NB3WogiFxeaslkfFh7e7shkInHZGD6Ml/q9UftKbONyYxSqKK0P9XlijZjAnstkhZC EEBxLLfOzkNi/lHLcZQST66HaB9r61Dd7++wOa8iWevNszDPjrBxfUiL+vJF/E5UBbTg HS8aSbRClE4KwLNIZw0kMNRPDxoEQ/WDGIeoEll76Hft6ImUE80+5/Ue4MS2LAxj332N G+BQ== X-Gm-Message-State: AElRT7HjlJcjBwMMcZdourQQmOw0KR0IWly0ihlO3i7sDGFU/u17tR0T ZCm2Yg1jvFFpeinC5hvls3kQWg== X-Received: by 2002:a9d:171e:: with SMTP id i30-v6mr15584510ota.204.1523031428447; Fri, 06 Apr 2018 09:17:08 -0700 (PDT) Received: from ?IPv6:2601:602:9802:a8dc::1082? ([2601:602:9802:a8dc::1082]) by smtp.gmail.com with ESMTPSA id 3-v6sm5492550ota.43.2018.04.06.09.17.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Apr 2018 09:17:07 -0700 (PDT) Subject: Re: [PATCH 1/1] arm64: To remove initrd reserved area entry from memblock To: CHANDAN VN , catalin.marinas@arm.com, will.deacon@arm.com, takahiro.akashi@linaro.org, james.morse@arm.com, robin.murphy@arm.com, steve.capper@arm.com, kristina.martsenko@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: cpgs@samsung.com, vn.chandan@gmail.com References: <1522990390-30804-1-git-send-email-chandan.vn@samsung.com> From: Laura Abbott Message-ID: Date: Fri, 6 Apr 2018 09:17:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1522990390-30804-1-git-send-email-chandan.vn@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2018 09:53 PM, CHANDAN VN wrote: > INITRD reserved area entry is not removed from memblock > even though initrd reserved area is freed. After freeing > the memory it is released from memblock. The same can be > checked from /sys/kernel/debug/memblock/reserved. > > The patch makes sure that the initrd entry is removed from > memblock when keepinitrd is not enabled. > Does this have an impact on anything besides accounting in memblock? > Signed-off-by: CHANDAN VN > --- > arch/arm64/mm/init.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 9f3c47a..1b18b47 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -646,8 +646,10 @@ void free_initmem(void) > > void __init free_initrd_mem(unsigned long start, unsigned long end) > { > - if (!keep_initrd) > + if (!keep_initrd) { > free_reserved_area((void *)start, (void *)end, 0, "initrd"); > + memblock_free(__virt_to_phys(start), end - start); > + } > } > > static int __init keepinitrd_setup(char *__unused) >