From patchwork Wed Apr 30 06:03:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 344059 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 3EA7114029E for ; Wed, 30 Apr 2014 16:04:46 +1000 (EST) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5E92B14010E for ; Wed, 30 Apr 2014 16:04:10 +1000 (EST) Received: by mail-ob0-f176.google.com with SMTP id wp4so1441413obc.21 for ; Tue, 29 Apr 2014 23:04:06 -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; bh=Aa2k3nOHyetLyA/Wm9tFRsORYYZ3szR+Z5PNvQwSHXo=; b=HGcoBi9kDvgLRtD5Rrj+prs9GYiCEr2u8iv0aTjOGvL+ORjAs0lpbLIzw9r7LJvkz9 E+lGo9cjf0fH6iqKBVGuKGcAp4gCNrTkaBMl4hfzCLajp6e2i1/CcEJIflgrdpXMq354 CqMX0yvKck0zCzfvRBtMknU9kaY1HesmrAh5tarAaFjJhfRMaUjr4Biixdn8Hypd6NRh NZmGiF2Q/wzPdnvbQbC1+NWJUkYU1tlIka5iTMO7mNvpg4E8qClT10REFytpz3ga8ibf fzVz5xexna4d2jsPvdhq0/5H+yeHtoUwc2NE7EzO4PCEwbYzYr5utdii+9/GZItnr+li LkQg== X-Received: by 10.182.43.132 with SMTP id w4mr2017636obl.41.1398837846730; Tue, 29 Apr 2014 23:04:06 -0700 (PDT) Received: from rob-laptop.globalsuite.net ([12.104.145.50]) by mx.google.com with ESMTPSA id y10sm49288348obk.4.2014.04.29.23.04.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Apr 2014 23:04:06 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] powerpc: fix skipping call to early_init_fdt_scan_reserved_mem Date: Wed, 30 Apr 2014 01:03:52 -0500 Message-Id: <1398837832-30052-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Rob Herring , Paul Mackerras , Grant Likely , linuxppc-dev@lists.ozlabs.org, Marek Szyprowski X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Rob Herring The call to early_init_fdt_scan_reserved_mem will be skipped if reserved-ranges is not found. Move the call earlier so that it is called unconditionally. Signed-off-by: Rob Herring Cc: Marek Szyprowski Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Tested-by: Stephen Chivers Acked-by: Benjamin Herrenschmidt --- I found this issue in testing of my fdt clean-up series (thanks to Stephen). Since the reserved memory support is new, I don't think it is critical to fix this for 3.15. I plan to include this with my fdt series for 3.16 unless I hear otherwise. Rob arch/powerpc/kernel/prom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 668aa47..d657549 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -567,6 +567,8 @@ static void __init early_reserve_mem_dt(void) unsigned long i, len, dt_root; const __be32 *prop; + early_init_fdt_scan_reserved_mem(); + dt_root = of_get_flat_dt_root(); prop = of_get_flat_dt_prop(dt_root, "reserved-ranges", &len); @@ -589,8 +591,6 @@ static void __init early_reserve_mem_dt(void) memblock_reserve(base, size); } } - - early_init_fdt_scan_reserved_mem(); } static void __init early_reserve_mem(void)