From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A439C433B4 for ; Wed, 7 Apr 2021 22:59:42 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 534EF611C9 for ; Wed, 7 Apr 2021 22:59:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 534EF611C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FG0G34hF6z3bwq for ; Thu, 8 Apr 2021 08:59:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.210.43; helo=mail-ot1-f43.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FG0Fh38mKz2yxn for ; Thu, 8 Apr 2021 08:59:19 +1000 (AEST) Received: by mail-ot1-f43.google.com with SMTP id w31-20020a9d36220000b02901f2cbfc9743so435578otb.7 for ; Wed, 07 Apr 2021 15:59:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QKXgCn18Rr1eqfdzx55WXMaeSuXNDv2BM9yLmUwClbs=; b=sRFoW6WIbrafylp4u8YQwmLO2oUI/YE2sHU5+ABsk0/MURj+sZlilEobcMEbGeUqwz IRKvY8niNH2hn0VV25DYFtdCEFncflRwCFryIEGm72eaUF8FOh32tTcBzQCmzm9uQosS 5HOnksz1XFiiwbMbaDuV8dCiNVzlV2urYyhuhcWOzJMgJFdaYgGKCBKXC/fXWfYlg9fA GjR/nJtm+uylGi3Mf8dFKIu2ir9ZOa0mm4nGIjScoeYIKOF+NdEkRjKdeoYAs+072AWY SCBMqUrcUA1RhwXyIayafu6sTHRahBHp3OLB+IigBBOmYnsJ0bPMhdJofpJwkYz3vmCh h3sQ== X-Gm-Message-State: AOAM530c08PDDetxuNYBqET1sGGxsAAbjf1sRLZVoP2Mcnw2iQpUwF4M lB/rwxRdRa9FB0baDl0D5w== X-Google-Smtp-Source: ABdhPJyvr5jHBGk0riO06gjL1cJLFcP8LjEM1PludhoIvgfnmnAE6t/+wBnt/64MHZhkodj4W6TLdA== X-Received: by 2002:a05:6830:22c3:: with SMTP id q3mr4869906otc.56.1617836356986; Wed, 07 Apr 2021 15:59:16 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id b22sm5786887ots.59.2021.04.07.15.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 15:59:16 -0700 (PDT) Received: (nullmailer pid 174484 invoked by uid 1000); Wed, 07 Apr 2021 22:59:15 -0000 Date: Wed, 7 Apr 2021 17:59:15 -0500 From: Rob Herring To: Daniel Walker Subject: Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section Message-ID: <20210407225915.GA147338@robh.at.kernel.org> References: <41021d66db2ab427c14255d2a24bb4517c8b58fd.1617126961.git.danielwa@cisco.com> <0c4b839f023f87c451c8aa3c4f7a8d92729c2f02.1617126961.git.danielwa@cisco.com> <20210330231717.GA2469518@zorba> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210330231717.GA2469518@zorba> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ruslan Ruslichenko , Daniel Gimpelevich , Frank Rowand , linuxppc-dev , X86 ML , "open list:MIPS" , "linux-kernel@vger.kernel.org" , xe-linux-external@cisco.com, Andrew Morton , Will Deacon Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Mar 30, 2021 at 04:17:53PM -0700, Daniel Walker wrote: > On Tue, Mar 30, 2021 at 02:49:13PM -0500, Rob Herring wrote: > > On Tue, Mar 30, 2021 at 12:57 PM Daniel Walker wrote: > > > > > > It looks like there's some seepage of cmdline stuff into > > > the generic device tree code. This conflicts with the > > > generic cmdline implementation so I remove it in the case > > > when that's enabled. > > > > > > Cc: xe-linux-external@cisco.com > > > Signed-off-by: Ruslan Ruslichenko > > > Signed-off-by: Daniel Walker > > > --- > > > drivers/of/fdt.c | 14 ++++++++++++++ > > > 1 file changed, 14 insertions(+) > > > > > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > > > index dcc1dd96911a..d8805cd9717a 100644 > > > --- a/drivers/of/fdt.c > > > +++ b/drivers/of/fdt.c > > > @@ -25,6 +25,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include /* for COMMAND_LINE_SIZE */ > > > #include > > > @@ -1050,6 +1051,18 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > > > > > > /* Retrieve command line */ > > > p = of_get_flat_dt_prop(node, "bootargs", &l); > > > + > > > +#if defined(CONFIG_GENERIC_CMDLINE) && defined(CONFIG_GENERIC_CMDLINE_OF) > > > > Moving in the wrong direction... This code already has too many > > #ifdef's. I like Christophe's version as it gets rid of all the code > > here. > > It's temporary .. Notice CONFIG_GENERIC_CMDLINE_OF is only used on PowerPC. I > experienced doubling on arm64 when this was used (i.e. the append and prepend > was added twice). > > I don't think there are any other users which can't be moved outside the device > tree code, but powerpc uses this function three times during boot up plus the > prom_init user. It's possible to use the generic command line in all four places, > but it become space inefficient. What's the 3rd use? I count kaslr code and in early_init_dt_scan_chosen_ppc. Do we need to build the command line for kaslr seed? Getting any build time value from the kernel is pointless. Rob