From patchwork Sat Jan 11 00:03:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Peddell X-Patchwork-Id: 3468651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 37874C02DC for ; Sat, 11 Jan 2014 00:29:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7747820142 for ; Sat, 11 Jan 2014 00:29:56 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 526002013D for ; Sat, 11 Jan 2014 00:29:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1mSS-0003Nr-1x; Sat, 11 Jan 2014 00:29:48 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1mSP-0007aL-EY; Sat, 11 Jan 2014 00:29:45 +0000 Received: from icp-osb-irony-out4.external.iinet.net.au ([203.59.1.220]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W1mSL-0007ZX-HW for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2014 00:29:43 +0000 Message-Id: <2b2c04$57762f@icp-osb-irony-out4.iinet.net.au> X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUFAP2P0FI6Bsjc/2dsb2JhbABZgwuDOqVPAZFsgQcWdIMlGBCBKYgDwxktjg1kHYJngToEnm8UA4smgz8qgSw X-IronPort-AV: E=Sophos;i="4.95,641,1384272000"; d="scan'208";a="175347791" Received: from unknown (HELO lurch) ([58.6.200.220]) by icp-osb-irony-out4.iinet.net.au with SMTP; 11 Jan 2014 08:29:16 +0800 Received: by lurch (sSMTP sendmail emulation); Sat, 11 Jan 2014 10:28:56 +1000 From: klightspeed@killerwolves.net To: linux-arm-kernel@lists.infradead.org Date: Sat, 11 Jan 2014 10:03:58 +1000 Subject: [PATCH] ARM: parameter initrd must override FDT initrd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140110_192942_048949_8BCFFE91 X-CRM114-Status: UNSURE ( 7.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: devicetree@vger.kernel.org, klightspeed@killerwolves.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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.3 required=5.0 tests=BAYES_00, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_MED, 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 The initrd_start and initrd_end as set by FDT was overriding the phys_initrd_start and phys_initrd_size set by the initrd= kernel parameter. This patch will ignore the initrd_start and initrd_end set earlier if phys_initrd_start and phys_initrd_size (as set by the initrd= parameter) are set. Signed-off-by: Ben Peddell --- arch/arm/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 1f7b19a..819c539 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -345,10 +345,11 @@ void __init arm_memblock_init(struct meminfo *mi, #endif #ifdef CONFIG_BLK_DEV_INITRD /* FDT scan will populate initrd_start */ - if (initrd_start) { + if (initrd_start && !phys_initrd_size) { phys_initrd_start = __virt_to_phys(initrd_start); phys_initrd_size = initrd_end - initrd_start; } + initrd_start = initrd_end = 0; if (phys_initrd_size && !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",