Message ID | 1444152277-826-1-git-send-email-mark.rutland@arm.com |
---|---|
State | Accepted |
Commit | 4ca3bc86bea23f38596ce7508f75e072839bde44 |
Headers | show
Return-Path: <patchwork-forward+bncBDRMFBMIXEGBB3MI2CYAKGQEZ43L6GA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id AE81F22FC5 for <linaro@patches.linaro.org>; Tue, 6 Oct 2015 17:27:10 +0000 (UTC) Received: by wisv5 with SMTP id v5sf44547627wis.0 for <linaro@patches.linaro.org>; Tue, 06 Oct 2015 10:27:10 -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:from:to:subject:date:message-id :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:cc:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=K8cs+y4723GUG52eRwDCw1c3P1B1s0zO0eSBXWyli4c=; b=ExZsrzdG+jiatpxqMC8MX1+Cxk1T14oDxuGnBBToPneYxvrvhlquz6Jk1lZBIFEaDJ ZPctYeLZCP9kDLsndfpaS5XIsT00NInIBIVB8BEWjjQSAkuGHswjSGdtO2MFFbr6Z+wn O+0DKIrJznZqpf3Jx8jJ6bWCGOmLozs24cT/0lwCcs5pHn9/ebpnPw8gvkatVfYjOFzX RpG/dkV63x55NJc4GEWkQ//wSewt2cCQKdV3OXLtJnDQyONZ5oK5JvnIcsHL4leMV6yO DmQ5OsadVGwYY8XJDMMoI+usQzvPomVfy/DRdOAnNdH9dbxadOztLC59YQEbxXVcqJYC zOXQ== X-Gm-Message-State: ALoCoQkFwgVe+dRte8LpmuuikTDqWZucgXXMRHwMM4lydDAFryZD1U5ZMeK+C792zKouOIIs4TDi X-Received: by 10.180.208.7 with SMTP id ma7mr3607107wic.5.1444152430039; Tue, 06 Oct 2015 10:27:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.38.206 with SMTP id m197ls602745lfm.55.gmail; Tue, 06 Oct 2015 10:27:09 -0700 (PDT) X-Received: by 10.25.151.205 with SMTP id z196mr9853903lfd.97.1444152429881; Tue, 06 Oct 2015 10:27:09 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id r1si21685673lbb.175.2015.10.06.10.27.09 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2015 10:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by laddr2 with SMTP id dr2so31271760lad.3 for <patchwork-forward@linaro.org>; Tue, 06 Oct 2015 10:27:09 -0700 (PDT) X-Received: by 10.112.64.72 with SMTP id m8mr14883940lbs.41.1444152429723; Tue, 06 Oct 2015 10:27:09 -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 w3csp1975983lbq; Tue, 6 Oct 2015 10:27:09 -0700 (PDT) X-Received: by 10.180.105.138 with SMTP id gm10mr17353284wib.37.1444152429116; Tue, 06 Oct 2015 10:27:09 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id cp3si25057092wib.18.2015.10.06.10.27.08 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2015 10:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 1ZjVzW-0005kf-7F; Tue, 06 Oct 2015 17:25:30 +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 1ZjVzT-0004zY-5d for linux-arm-kernel@lists.infradead.org; Tue, 06 Oct 2015 17:25:27 +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 797413C; Tue, 6 Oct 2015 10:25:04 -0700 (PDT) Received: from leverpostej.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8834B3F487; Tue, 6 Oct 2015 10:25:03 -0700 (PDT) From: Mark Rutland <mark.rutland@arm.com> To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com Subject: [PATCH] arm64: Don't relocate non-existent initrd Date: Tue, 6 Oct 2015 18:24:37 +0100 Message-Id: <1444152277-826-1-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151006_102527_233700_AF67B84C X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, Mark Salter <msalter@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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.215.45 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 |
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),
When booting a kernel without an initrd, the kernel reports that it moves -1 bytes worth, having gone through the motions with initrd_start equal to initrd_end: Moving initrd from [4080000000-407fffffff] to [9fff49000-9fff48fff] Prevent this by bailing out early when the initrd size is zero (i.e. we have no initrd), avoiding the confusing message and other associated work. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Fixes: 1570f0d7ab425c1e ("arm64: support initrd outside kernel linear map") Cc: Mark Salter <msalter@redhat.com> Cc: Will Deacon <will.deacon@arm.com> --- arch/arm64/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+)