From patchwork Mon Sep 16 23:09:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2900041 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 6844CBFF05 for ; Mon, 16 Sep 2013 23:12:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A8F62032D for ; Mon, 16 Sep 2013 23:12:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD44D20326 for ; Mon, 16 Sep 2013 23:12:25 +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 1VLhwl-0000Or-3E; Mon, 16 Sep 2013 23:11:12 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLhwQ-0003Ef-5l; Mon, 16 Sep 2013 23:10:50 +0000 Received: from mail-ob0-x236.google.com ([2607:f8b0:4003:c01::236]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLhvn-000379-Cw for linux-arm-kernel@lists.infradead.org; Mon, 16 Sep 2013 23:10:13 +0000 Received: by mail-ob0-f182.google.com with SMTP id wo20so4566634obc.27 for ; Mon, 16 Sep 2013 16:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PV+smD3xEGGg2DE/uXW3Tkxkw3qXL2lBd15oXcMts6o=; b=T9F572VoV4D5AIO+fYRqUkEwFK2/7yIwdM4pbumKE1u2ZAemnhtQPx1gKASN12l5wD uNoHAMoL5tjujaSlbA/mXuO6w0cTDbofVfk+y6WwlM29QCvtcFu59z8O3gHxA/h0b/aK W6uzFVxbznfWaqTOaSEz2D2/bTyObGxGT/bL00LLqM1EmdrKyDxQTiDi+sIZtmN4wqX8 REsBCLQstsszUsd7v2tEV7E/VW0U/89MZ0nN9MJn3anhNUbKEb4B2WBZQEDxMVBdUFoP tifR3S2gOKkd1/yvgFc4e8lGcQ5tIltjuJQDb+1hyseAa/YAFwTtaS7mHaYpqy4cmLrY hiNA== X-Received: by 10.60.43.169 with SMTP id x9mr13462oel.88.1379372990132; Mon, 16 Sep 2013 16:09:50 -0700 (PDT) Received: from rob-laptop.calxeda.com ([173.226.190.126]) by mx.google.com with ESMTPSA id s14sm34574615oeo.1.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 16:09:49 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 19/28] arm: set initrd_start/initrd_end for fdt scan Date: Mon, 16 Sep 2013 18:09:15 -0500 Message-Id: <1379372965-22359-20-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1379372965-22359-1-git-send-email-robherring2@gmail.com> References: <1379372965-22359-1-git-send-email-robherring2@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130916_191011_573912_B2D45DBB X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: -1.8 (-) Cc: Grant Likely , Russell King , linux-arm-kernel@lists.infradead.org, Rob Herring 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Rob Herring In order to unify the initrd scanning for DT across architectures, make arm set initrd_start and initrd_end instead of the physical addresses. This is aligned with all other architectures. Signed-off-by: Rob Herring Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Acked-by: Grant Likely --- arch/arm/mm/init.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index febaee7..9eeb1cd 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -77,11 +77,11 @@ static int __init parse_tag_initrd2(const struct tag *tag) __tagtable(ATAG_INITRD2, parse_tag_initrd2); -#ifdef CONFIG_OF_FLATTREE +#if defined(CONFIG_OF_FLATTREE) && defined(CONFIG_BLK_DEV_INITRD) void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) { - phys_initrd_start = start; - phys_initrd_size = end - start; + initrd_start = (unsigned long)__va(start); + initrd_end = (unsigned long)__va(end); } #endif /* CONFIG_OF_FLATTREE */ @@ -351,6 +351,11 @@ void __init arm_memblock_init(struct meminfo *mi, memblock_reserve(__pa(_stext), _end - _stext); #endif #ifdef CONFIG_BLK_DEV_INITRD + /* FDT scan will populate initrd_start */ + if (initrd_start) { + phys_initrd_start = __virt_to_phys(initrd_start); + phys_initrd_size = initrd_end - initrd_start; + } 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",