From patchwork Tue Sep 8 11:31:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 7140241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BA839F380 for ; Tue, 8 Sep 2015 11:34:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C9BC206E1 for ; Tue, 8 Sep 2015 11:34:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EBF220663 for ; Tue, 8 Sep 2015 11:34:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZZH8S-0006Ak-8j; Tue, 08 Sep 2015 11:32:24 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZZH8P-0005tT-Li for linux-arm-kernel@lists.infradead.org; Tue, 08 Sep 2015 11:32:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0113075; Tue, 8 Sep 2015 04:32:07 -0700 (PDT) Received: from leverpostej (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 53B453F318; Tue, 8 Sep 2015 04:31:55 -0700 (PDT) Date: Tue, 8 Sep 2015 12:31:13 +0100 From: Mark Rutland To: Mark Salter Subject: Re: [PATCH V4 2/3] arm64: support initrd outside kernel linear map Message-ID: <20150908113113.GA20562@leverpostej> References: <1439830867-14935-1-git-send-email-msalter@redhat.com> <1439830867-14935-3-git-send-email-msalter@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1439830867-14935-3-git-send-email-msalter@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150908_043221_730835_03BB31FF X-CRM114-Status: GOOD ( 13.64 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arch@vger.kernel.org" , Arnd Bergmann , Ard Biesheuvel , Catalin Marinas , "x86@kernel.org" , Will Deacon , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Andrew Morton , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Mark, On Mon, Aug 17, 2015 at 06:01:06PM +0100, Mark Salter wrote: > The use of mem= could leave part or all of the initrd outside of > the kernel linear map. This will lead to an error when unpacking > the initrd and a probable failure to boot. This patch catches that > situation and relocates the initrd to be fully within the linear > map. With next-20150908, this patch results in a confusing message at boot when not using an initrd: Moving initrd from [4080000000-407fffffff] to [9fff49000-9fff48fff] I think that can be solved by folding in the diff below. Thanks, Mark. diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 6bab21f..2322479 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -364,6 +364,8 @@ static void __init relocate_initrd(void) to_free = ram_end - orig_start; size = orig_end - orig_start; + if (!size) + return; /* initrd needs to be relocated completely inside linear mapping */ new_start = memblock_find_in_range(0, PFN_PHYS(max_pfn),