From patchwork Thu Mar 13 21:36:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 3828851 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CFF209F2BB for ; Thu, 13 Mar 2014 21:40:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF8CD2028D for ; Thu, 13 Mar 2014 21:40:14 +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 D52622020A for ; Thu, 13 Mar 2014 21:40:13 +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 1WODME-00035I-JM; Thu, 13 Mar 2014 21:40:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WODMC-0000MX-2S; Thu, 13 Mar 2014 21:40:04 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WODM7-0000Lh-9v for linux-arm-kernel@lists.infradead.org; Thu, 13 Mar 2014 21:40:00 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 8CE8E13EDF4; Thu, 13 Mar 2014 21:39:36 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 775B513EFA2; Thu, 13 Mar 2014 21:39:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C984C13EF19; Thu, 13 Mar 2014 21:39:35 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id BF43C60E96; Thu, 13 Mar 2014 16:36:36 -0500 (CDT) Date: Thu, 13 Mar 2014 16:36:36 -0500 From: Josh Cartwright To: Kevin Hilman Subject: Re: [PATCH v5 09/11] arm: add support for reserved memory defined by device tree Message-ID: <20140313213636.GR18529@joshc.qualcomm.com> References: <1392985527-6260-1-git-send-email-m.szyprowski@samsung.com> <1392985527-6260-10-git-send-email-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140313_173959_478029_440DDD79 X-CRM114-Status: GOOD ( 21.95 ) X-Spam-Score: -1.9 (-) Cc: Mark Rutland , linux-doc@vger.kernel.org, Benjamin Herrenschmidt , Tomasz Figa , Will Deacon , Tomasz Figa , Paul Mackerras , Marek Szyprowski , Arnd Bergmann , Catalin Marinas , Grant Likely , "devicetree@vger.kernel.org" , Laura Abbott , Ian Campbell , Pawel Moll , Stephen Warren , Sascha Hauer , Michal Nazarewicz , linaro-mm-sig@lists.linaro.org, Marc , Nishanth Peethambaran , Rob Herring , linux-arm-kernel , LKML , Kumar Gala , Olof Johansson 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Mar 13, 2014 at 01:46:50PM -0700, Kevin Hilman wrote: > On Fri, Feb 21, 2014 at 4:25 AM, Marek Szyprowski > wrote: > > Enable reserved memory initialization from device tree. > > > > Signed-off-by: Marek Szyprowski > > This patch has hit -next and several legacy (non-DT) boot failures > were detected and bisected down to this patch. A quick scan looks > like there needs to be some sanity checking whether a DT is even > present. Hmm. Yes, the code unconditionally calls of_flat_dt_scan(), which will gladly touch initial_boot_params, even though it may be uninitialized. The below patch should allow these boards to boot... However, I'm wondering if there is a good reason why we don't parse the /reserved-memory nodes at the right after we parse the /memory nodes as part of early_init_dt_scan()... Thanks, Josh --8<-- Subject: [PATCH] drivers: of: only scan for reserved mem when fdt present Reported-by: Kevin Hilman Signed-off-by: Josh Cartwright Tested-by: Kevin Hilman --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 510c0d8..501bc83 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -557,6 +557,9 @@ static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname, */ void __init early_init_fdt_scan_reserved_mem(void) { + if (!initial_boot_params) + return; + of_scan_flat_dt(__fdt_scan_reserved_mem, NULL); fdt_init_reserved_mem(); }