Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp953426pxf; Wed, 7 Apr 2021 16:00:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDB+9dBGEZLAhtoyIesnQge9J/9T7iLTsXVmVdPkCXqq8MEpTdK1ORA/wkhlif/BgUFwIr X-Received: by 2002:a17:90b:b09:: with SMTP id bf9mr5318008pjb.17.1617836435919; Wed, 07 Apr 2021 16:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617836435; cv=none; d=google.com; s=arc-20160816; b=tlzTgUXXFH9Bb2Ymo6dDGcimEHyByN0mSSGOPK+IvW0loWxTA4gLEZOyz2Y+PrR6EZ WP4ssqZ5rVGTsfNLqYhAH3l4dBF0VdywN9RrtJ/VhD4PrXL/NeUiZ+BSoD3UrBZDKNyh zG4DCqLo3k5eyh3AqYWWPLVnPK68mcGIIvsRsMYpNuIZfnixkwBKihaAn3qAoQgGuN/t k1Wj7lPe0/x0tvVQ9DCegqblVi31hkWRbPuzSGwy2VnMkgBmXmJeEKURrt4IqfnFM29Q PfVZ0LahhWYANtqwyXKVaMPTtAgplbThqty86UI2bngJhnjhD82XyYQ98CNLafy36yGL b/+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QKXgCn18Rr1eqfdzx55WXMaeSuXNDv2BM9yLmUwClbs=; b=PYlO3ekKY+nUre/sR6i7lTs3ti80UYBFoKuEg/QfhT2OPLzLKjWcLnfAcQ31RPIlAP RaUspMwyLmCi4n/F0U6cvChF2cx2izU7zOlHv2Bj0lUzyxff/hYetI6zAQWSlQkFMOni uC3Q9O5F+xZ1yMKiWIR1q8ciK19MM3d6uPFVXPJjdiVJfDOn8umtcfu9SYdUJ4bkM4IF ZLE2W1ICU66T7jsVkm8MCb2u74n+WxyqNwVmFb6cxwydxGzHfMmVzO019sPciV5onc8s 666NjyUiE2z6kYLrUhP/UjYT3Audi5dEVs5+BLL5351PeAFmQOdgpnd3hBgEdP4+hjb6 mh6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id w13si8201439pjg.144.2021.04.07.16.00.15; Wed, 07 Apr 2021 16:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229606AbhDGW72 (ORCPT + 99 others); Wed, 7 Apr 2021 18:59:28 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]:38718 "EHLO mail-ot1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbhDGW71 (ORCPT ); Wed, 7 Apr 2021 18:59:27 -0400 Received: by mail-ot1-f51.google.com with SMTP id w21-20020a9d63950000b02901ce7b8c45b4so444357otk.5; Wed, 07 Apr 2021 15:59:17 -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=VESw8pT467vjoArwrVyomMYyeqqbh4HIcU9XANCmWEapiO6jUMGMNQg4HmzTqMIcq+ JbH66117F9NvI+GF3qCNYrRRJM6R17bDeL7Bq0Uz6AkFQ3tIGHGRGbvTu6zoR9EqwCVX /aGP9a9tnJaJugjAsxxJstg6UNElmfrq7Y6loluLCE2MtFTiqGgTsfE+LEjRe7DycIFW CPxaNiYX/6gYQo7bYHmQIcMgz7sURjSAc0D5xHE7ghjVyxCSM0OHfG1O1rWQvM6S3WOC L8JvDRcUufLAjgpDVVS+m3TUmxcSBF0TUqaQTviIGV4VPa9b195/1SqWSmQJ1WJVAwv/ HVBA== X-Gm-Message-State: AOAM532VwXR8f0YE4xX29CHNQdh6oESBow7mexcG7M/AzY40/NwauehC bC61Q4Z4EmxTZ2RHRDOAkg== 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 Cc: Will Deacon , Christophe Leroy , Daniel Gimpelevich , Andrew Morton , X86 ML , "open list:MIPS" , linuxppc-dev , Frank Rowand , xe-linux-external@cisco.com, Ruslan Ruslichenko , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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