Received: by 10.223.185.116 with SMTP id b49csp6640256wrg; Wed, 28 Feb 2018 12:52:59 -0800 (PST) X-Google-Smtp-Source: AH8x226HpJExlTP7r32AO2kkzO1BDnmI9y3EGSRGjP/KXg2mr5fB73T0KoVughteXrH9wrzH93FN X-Received: by 10.99.184.1 with SMTP id p1mr15096443pge.96.1519851179529; Wed, 28 Feb 2018 12:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519851179; cv=none; d=google.com; s=arc-20160816; b=OrESBxYTYnXG8Cc3NAolAPNo3tO+qVs5caIMO2zVcH8X6GyNg0V3PC79SZyGmn11nv ra12a7uyVRlFu4uAxZHyd4jEr4/ptO6zBRAX5xbgUKRfWoWbJcXBQlnLgxw2DlWkdQVO 2de2C3Xi8bOpJrwk/wGb+Z4xJFXTUpLokzuZzLTQE/A7yLO1VjZRVt3ImLhNc9rpmwfk pB6J0wABAXZfe0TY5aUm0AzgFEQVrcb7JrSeGB/lWtiBw4LCNqe376TPspAZtjpPaDQ0 w9AGVk2IBWurhd72e3ZEWu5Nln/mpJrfL/jrGray4PDVItBzpUQ8Va0SCsD0raCgXBpp 8ToQ== 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 :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=F6YieNDXQKoiDyyWe1sATTjMuAyZXDVd7w4/O4E3SOw=; b=c7T4mevqOIiWpCVBdjCwrwyahd9TDJE417bh0Cy+UTmoO2ujURAV5wTcr1dljZMM0X iK5NhEcCq98vtm+xy23qew7eVW0draJ6GDjtPRltpaZKdMHB4t0fRU4ry2xE0+oCvaiP JkTFIHKWfTwp7bhp3ZM5oI7StSUMzT4pNbzn5tW3kOqB2zL4YL+dFDSAweFGEhMwNPeg nOKTgdFQc/Qc3TMsf2z5MpbX47DuO7eENBllaYU8rqcrPM6p3LvLVXrlpjdbIToX+B5J t8BB631K9Artnk4mCyQ1exsQBMdT8+LP1koxRnZicosjlf2WETaniIdLsDoATG+PVQCG ewtw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11-v6si1887675pln.323.2018.02.28.12.52.43; Wed, 28 Feb 2018 12:52:59 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934775AbeB1Uu2 (ORCPT + 99 others); Wed, 28 Feb 2018 15:50:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:39342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934682AbeB1Uu0 (ORCPT ); Wed, 28 Feb 2018 15:50:26 -0500 Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) (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 2CB222133D; Wed, 28 Feb 2018 20:50:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CB222133D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qt0-f170.google.com with SMTP id r16so4795595qtm.4; Wed, 28 Feb 2018 12:50:26 -0800 (PST) X-Gm-Message-State: APf1xPAuZzjl897nIs84371pUhUVWJwqfyUKlbVhEdI2MGmgEIdbGu6O OLGwb4Ooh+XVZvmKEWmEgTT2hBbW8oBFkrhkBw== X-Received: by 10.237.51.97 with SMTP id u88mr31984176qtd.27.1519849586437; Wed, 28 Feb 2018 12:26:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.178.131 with HTTP; Wed, 28 Feb 2018 12:26:05 -0800 (PST) In-Reply-To: <300becd6-db35-59e6-1b81-6b1940070df0@gmail.com> References: <1519000156-14319-1-git-send-email-frowand.list@gmail.com> <300becd6-db35-59e6-1b81-6b1940070df0@gmail.com> From: Rob Herring Date: Wed, 28 Feb 2018 14:26:05 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: Kconfig: OF_OVERLAY, select OF_EARLY_FLATTREE To: Frank Rowand Cc: Pantelis Antoniou , Pantelis Antoniou , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Geert Uytterhoeven 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 Sorry for the delay, been away for a few days. On Mon, Feb 19, 2018 at 12:24 AM, Frank Rowand wrote: > > On 02/18/18 17:46, Rob Herring wrote: > > On Sun, Feb 18, 2018 at 6:29 PM, wrote: > >> From: Frank Rowand > >> > >> kbuild test robot reported a new warning for a recent patch: > >>>> drivers/of/overlay.c:832:2: error: implicit declaration of function 'of_fdt_unflatten_tree' [-Werror=implicit-function-declaration] > >> of_fdt_unflatten_tree(new_fdt, NULL, &overlay_root); > >> > >> The cause is that the prototype for of_fdt_unflatten_tree() in > >> include/linux/of_fdt.c is guarded by OF_EARLY_FLATTREE. Umm, this is not true. of_fdt_unflatten_tree is outside the ifdef for OF_EARLY_FLATTREE. > >> > >> This was a pre-existing problem for any overlay related caller of > >> of_fdt_unflatten_device_tree(), who was then going to pass the > >> unflattened tree to of_overlay_apply(). After the patch that triggered > >> this warning, all other overlay callers of of_fdt_unflatten_device_tree() > >> no longer exist, so adding the select to OF_OVERLAY is a sufficient fix. > >> > >> To reproduce the warning: > >> Use the .config attached to https://lkml.org/lkml/2018/2/17/268 > >> make ARCH=i386 olddefconfig > >> make ARCH=i386 CC=gcc-7 drivers/of/overlay.o > >> > >> Signed-off-by: Frank Rowand > >> --- > >> drivers/of/Kconfig | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > >> index 783e0870bd22..00a6abfaaec7 100644 > >> --- a/drivers/of/Kconfig > >> +++ b/drivers/of/Kconfig > >> @@ -92,6 +92,7 @@ config OF_RESOLVE > >> config OF_OVERLAY > >> bool "Device Tree overlays" > >> select OF_DYNAMIC > >> + select OF_EARLY_FLATTREE This should really have been OF_FLATTREE... > > If we do this, we might as well kill OF_EARLY_FLATTREE. What platform > > really boots from not FDT, but uses DT without overlays? > > Making sure I'm understanding... So you want to remove OF_EARLY_FLATTREE > and convert the current users of it to OF_FLATTREE? Right. OF_EARLY_FLATTREE just controls everything that's in __init section anyway. So the question is it worth a kconfig option to control code that's in the __init section and will get discarded anyway? > I don't see any way to directly configure OF_FLATTREE and I don't see any > Kconfig file selecting it, other than drivers/of/Kconfig which selects > OF_FLATTREE from OF_EARLY_FLATTREE. So as far as I can tell, the two > config options are essentially a single config option. Meaning that > either one could be replaced by the other. > > Changing all to OF_FLATTREE will touch more files and thus will be a > bit more obtrusive. It looks like it would take two releases to avoid > a flag day change. > > Changing all to OF_EARLY_FLATTREE can be done in a single release. I would get rid of OF_EARLY_FLATREE within the DT core code making it do nothing more than select OF_FLATTREE. Then the arches can later just select OF_FLATTREE directly. But this is all orthogonal to your issue. I think we need to keep the overlay dependencies on FDT separate. In theory we could support non-FDT sources or some more complex use that needs to unflatten FDT themselves. I don't really want to add another user visible kconfig option (OF_FDT_OVERLAY), so I think as long as we structure things to support that when needed we're fine. Rob