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: 53263 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 49AB422B11 for ; Tue, 8 Sep 2015 11:32:07 +0000 (UTC) Received: by lbcjc2 with SMTP id jc2sf34129976lbc.0 for ; Tue, 08 Sep 2015 04:32:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=XcryT1w2t0fxZM6nVv44eeB1430LH3eERqNRvF7wK8w=; b=V7yLHMotjqx5UtfU72mMLbbco3LwFTkTkpoAavIFDbmykpLoneUlT1+b5myevmNX1H U4GGWHTs7hxkPuObTt0nWI/JE/rCKcAW1MgNk9C8Hb8e5HKcXoUE5eKcFRXmt+/kjfRO h2Lv+orODii3Ko8Uq5OHIZoJu652afzCkvvW+/OfhIQz0OC2/SaEQbC6ghIDX+8RjNjv bGzRwK8mpXV1R4ZJvYNPYatH3NgAcCkxzjcgO7heJRfgZ4CgH9RCyy/R6Hvh+k/rbV5T QJEF1aFYHrfgm8iwkQuN8z6eV51A4trEg+kQrZP5WJa+ht9OW329W7mQC/JvpE0xc+/n Jf+g== X-Gm-Message-State: ALoCoQkOZO3DJ0I9toD41b/NopRjIw/pHhIsVtR2LBiT/ascBHN7JWZWrzA8BIVq2sLP89e5CjgX X-Received: by 10.180.79.66 with SMTP id h2mr6442459wix.3.1441711926253; Tue, 08 Sep 2015 04:32:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.74 with SMTP id g10ls685885lab.92.gmail; Tue, 08 Sep 2015 04:32:06 -0700 (PDT) X-Received: by 10.152.3.1 with SMTP id 1mr22531834lay.12.1441711926052; Tue, 08 Sep 2015 04:32:06 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id kf2si2926129lbc.174.2015.09.08.04.32.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 04:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbmp1 with SMTP id mp1so51574591lbb.1 for ; Tue, 08 Sep 2015 04:32:05 -0700 (PDT) X-Received: by 10.152.170.230 with SMTP id ap6mr21893652lac.73.1441711925886; Tue, 08 Sep 2015 04:32:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp911882lbq; Tue, 8 Sep 2015 04:32:04 -0700 (PDT) X-Received: by 10.50.111.133 with SMTP id ii5mr39792403igb.6.1441711924662; Tue, 08 Sep 2015 04:32:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si5026241pdc.81.2015.09.08.04.32.03; Tue, 08 Sep 2015 04:32:04 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754559AbbIHLcB (ORCPT + 28 others); Tue, 8 Sep 2015 07:32:01 -0400 Received: from foss.arm.com ([217.140.101.70]:54054 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754142AbbIHLb6 (ORCPT ); Tue, 8 Sep 2015 07:31:58 -0400 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 Cc: Catalin Marinas , Will Deacon , "x86@kernel.org" , Andrew Morton , Arnd Bergmann , Ard Biesheuvel , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mm@kvack.org" , "linux-arch@vger.kernel.org" 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mark.rutland@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ 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),