Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3709322imm; Wed, 5 Sep 2018 04:53:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbQM/5IRb/29F5/NM1cxtGxr44FLqgyaHSJryjA41zBUOIr63nLVqSsjSj78cOvarfmLfBY X-Received: by 2002:aa7:82c3:: with SMTP id f3-v6mr40583835pfn.136.1536148411319; Wed, 05 Sep 2018 04:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536148411; cv=none; d=google.com; s=arc-20160816; b=G94rvxmWpGANXOcUkPOwrjqolvVGzbskbt5pnceosBhysAl3X7yduaccoXSJupoEaq 7GIe5gT5oewHtYB4G8vmqi2P8G4MhKp1s23BLDR17LJ2In27I8MIjNlysYebIYGZdbds 1crv8Pz3KF9nQcdMMre+W3sC04fTcftMWL44YU6Pcafom5Jj6qQpLDB86FRuStY+deQ4 wOxetO3QOhZZsJEHlTYyXPcgm03kUOUvUPMSnMM60LC7ub692DxIQVR1UdM91NEZ4H0x h60IOkl3XZeKXOEXsNvhThrTodBe0SZgBy9oM8et27p+ssGAOFLlJ30yedTCsEwdTCCu zfWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OJvLJ95BOd1Xjx8CcmhlMDvVhM+M792gWdWZ+s7GiTY=; b=BdtvaTyQRqvjOy2m5A0ZUpTT8dcxzxFaxlgndY12wc4OAf3h6MaycXcJs1k3T5gE3T PWIHQp03yqWNBZLp0NOtGWjIC7YUa5M6Bdbfj07sf9hLvw20afjLrJCJ067L2h/ZDhfL SUTdHiWoYKPLKBlX3d1mY0kwIIo6yaf6++MzryFIUOqiYC1yMpo7d/OjVkGeyuP/KZ5b cLtueTC/3bIwZIWwvZ9f6flkjiH9Gd8ZKqC6n6NJcS1yXBCyuawa1HzaABo/eAob8Hvs /fIMaZXmqLvDC+NVUVwFxGOf0Z1TrQFVpXxm+UfQ++oMZsHkXEER0yiF/791oTrH9fp2 l0yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Aat3Hg2q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si1888517pfe.31.2018.09.05.04.53.15; Wed, 05 Sep 2018 04:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Aat3Hg2q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727616AbeIEQV1 (ORCPT + 99 others); Wed, 5 Sep 2018 12:21:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:37132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeIEQV1 (ORCPT ); Wed, 5 Sep 2018 12:21:27 -0400 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 532BD20857; Wed, 5 Sep 2018 11:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536148293; bh=HHEfYWgEJ5vmpfBSBprIk9vCLvaZcerqqe6tadM0IzM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Aat3Hg2q/GFAgfYSlzcRGiXHq6F5JsUrA+emTHjK0vAosO+lC4ogTNlh85ILLEAL9 sGARBSqzbH3HzezeWIf0SV5t9Yhx9lciTIhGLQ85FulRWybcUGB7hRtfkmxeUZo0BL FJjbpaMJbpvWsWw16oefxxuBHycVFGjdI2KLqomI= Received: by mail-qk1-f172.google.com with SMTP id j7-v6so4585660qkd.13; Wed, 05 Sep 2018 04:51:33 -0700 (PDT) X-Gm-Message-State: APzg51DDyh7ux1FrzdCALnYa97skV6I1Q8iQIxTHWBCEmLRZtRhQzuIB cSrz8lRZwAINne6tUsXYwiDD3WqhF9JJlXbjdw== X-Received: by 2002:a37:169c:: with SMTP id 28-v6mr31650649qkw.184.1536148292502; Wed, 05 Sep 2018 04:51:32 -0700 (PDT) MIME-Version: 1.0 References: <20180830190523.31474-1-robh@kernel.org> <20180830190523.31474-2-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Wed, 5 Sep 2018 06:51:20 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] of/fdt: Scan the root node properties earlier To: Frank Rowand Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 4, 2018 at 8:49 PM Frank Rowand wrote: > > On 08/30/18 12:05, Rob Herring wrote: > > Scan the root node properties (#{size,address}-cells) earlier, > > ^^^^^^^ > before mdesc->dt_fixup() is called > > > so that > > the dt_root_addr_cells and dt_root_size_cells variables are initialized > > and can be used. > by mdesc->dt_fixup() That's an ARM specific detail. Granted, ARM is the only caller. > > > > Cc: Frank Rowand > > Signed-off-by: Rob Herring > > --- > > drivers/of/fdt.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > Moving early_init_dt_scan_root() to inside early_init_dt_verify() > puts something that has nothing to do with verifying the fdt > into a function whose purpose is the verify. It hides the side > effect of initializing the dt_root_addr_cells and dt_root_size_cells > variables. It already has the side effect of setting initial_boot_params which every subsequent function needs. > I suggest creating a new function early_init_dt_scan_init_pre_dt_fixup(), > move the chunk of code there instead of to early_init_dt_scan_nodes(), > and call the new function from setup_machine_fdt(), just before > calling mdesc->dt_fixup(). This would be a little bit more code, > but more clearly showing the intent. I'm trying to reduce the number of functions arches call and renaming would need a bunch of arch changes. This change will also let me make early_init_dt_scan_root private as powerpc is the only user. I need to dust off a patch for that. I'd be more inclined to push exynos to remove this altogether. After all, if they claim their bindings are unstable, they can't really claim their bootloader is stable/fixed. Rob