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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A836EC49ED7 for ; Mon, 16 Sep 2019 07:21:57 +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 7A17B206A4 for ; Mon, 16 Sep 2019 07:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="daCkL3tU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="GFEe+YXD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A17B206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=l8Z1BAjenIkRCU4KKSzUCxkxx3lcWo8C+2ni+dQS5ek=; b=daC kL3tUBIPB5ncqZfPYgWJkoQ8zxvfJRcaFWRKGC31hSNNNUNM9UuzvGnRG+PTcZE0ZeY0teWLXl5CH vp+/3mg0cDa9OAqLtBENE/A1WGoWZ8njDNMyup/uOotWa5tI6D9MKUNS1EFbqjYhinZGvvK387GrV e46iIOTL5ggSgWfRugfX3NJ70RtRzrxcK39X3lyA6aei2r8Rv6ncddEcVAKgg8xEKC/xeJqUYNMYh HOsnKDD136OEAtTd7PsxVicdAa4jAJ2R9DZQkpDctPRUJJUPHm5O+hkd+QjUIndW+d5LeNjkntust NOE3Z1A7ZErkaMpgKSPU8KOp3Pv+l/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9lKV-0004Iv-0N; Mon, 16 Sep 2019 07:21:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9lKR-0004I2-EI for linux-arm-kernel@lists.infradead.org; Mon, 16 Sep 2019 07:21:44 +0000 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3580206A4; Mon, 16 Sep 2019 07:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568618500; bh=ZNzODOxruTg8StFF9gj8UjlKbahmC5vEdHRA5AUlXQs=; h=From:To:Cc:Subject:Date:From; b=GFEe+YXDq1D7SlleJ3gt0iXMEu0DdY+ZGgYH0brOW8ZMldag9FGK8oSw4SKcEmD19 LwlwmHRtN8G4K7pvjCIj7HrIVPA91yY7uOqhRhQkx7cmAw6+obkWqf59oZdBulmRtJ z5ADC604hp9Q8Vwl/6jGPYZfWJL7Tx8GU0gMh7Wg= From: Mike Rapoport To: Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH] arm64: use generic free_initrd_mem() Date: Mon, 16 Sep 2019 10:21:28 +0300 Message-Id: <1568618488-19055-1-git-send-email-rppt@kernel.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190916_002143_504205_27961FFA X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mike Rapoport MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mike Rapoport arm64 calls memblock_free() for the initrd area in its implementation of free_initrd_mem(), but this call has no actual effect that late in the boot process. By the time initrd is freed, all the reserved memory is managed by the page allocator and the memblock.reserved is unused, so there is no point to update it. Without the memblock_free() call the only difference between arm64 and the generic versions of free_initrd_mem() is the memory poisoning. Switching arm64 to the generic version will enable the poisoning. Signed-off-by: Mike Rapoport --- I've boot tested it on qemu and I've checked that kexec works. arch/arm64/mm/init.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index f3c7952..8ad2934 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -567,14 +567,6 @@ void free_initmem(void) unmap_kernel_range((u64)__init_begin, (u64)(__init_end - __init_begin)); } -#ifdef CONFIG_BLK_DEV_INITRD -void __init free_initrd_mem(unsigned long start, unsigned long end) -{ - free_reserved_area((void *)start, (void *)end, 0, "initrd"); - memblock_free(__virt_to_phys(start), end - start); -} -#endif - /* * Dump out memory limit information on panic. */ -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel