Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2884198pxb; Tue, 9 Mar 2021 13:31:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdFkh6GO2N18whMf7dE8DoJrWmWwvQf86IdyaL9sGhcwlYyhsE+xVgBeQvxyVE9vcvQBOz X-Received: by 2002:a17:906:95d1:: with SMTP id n17mr90310ejy.394.1615325510951; Tue, 09 Mar 2021 13:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615325510; cv=none; d=google.com; s=arc-20160816; b=AIIx8ooyoeNxAFIq6lGoZ69VIOxsDQXpV5jwH07uPxWAeiRSQ7q0J+QswLIDJG0J6r FiZx5y5FQjcbfD874E+Y+kl+JGbyBa0WEfl7OaAYRV5ANNWLpn4f6lBkBdfXpBpmg0lH DZlWbC5zmuPcF7vs7JY6or2QDJ9N2bxw+x7wAbbAkSURtik7wTlb7pw8rsFaoP2/T1lS h/1+jj22bmBHE9ZndwUcFrAMbXSRtyxMmheGaZK2ZcSSPr0YpTS/oHnup8hH5T/Njj/c t2sALm503rFdA4NGURR6ZkpA76EyHbO+9c0kFyUdswaDofSkwBIRdfZGSD/B7fa3DAWE d4iA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r0YnONzpTOYg8r5nG/x1OVBON8iLgKIw6gJADD7M/MA=; b=ciSiUKBM5A8fyGOqAhbLcG0Zb+FqHYOet6tERBFAXBsyQXwKw9UrLXDuHCRyGNK0go A942xNyJ0ROZCFULk6gIEF8tWbmd2aVq3JSxW0l6TAcZEr1iFlLFIGuT0hla2XKQu9Vw gf0vOLPRN+8hnvhBsY/KZh59gEqZiAtNC8hZQ7HhWOUJb/6fHQow15TyoQ9aCxPz3R7C N+y1iX8r2lpt2g4le+oGxakkhNxdn4l3h1gx8zabpRuAnQBm4FrcmGJvSs4ubL/5rxII 6iI1H7fp4ZLg8Qt2refuxWC6NHgkDhc3gOzuT3BX3AyC3D4eFuXaLn2rXyjIShplr1f/ 2+sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=cXhxfCHt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si9943792edw.69.2021.03.09.13.31.28; Tue, 09 Mar 2021 13:31:50 -0800 (PST) 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; dkim=pass header.i=@cisco.com header.s=iport header.b=cXhxfCHt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231904AbhCIV37 (ORCPT + 99 others); Tue, 9 Mar 2021 16:29:59 -0500 Received: from rcdn-iport-2.cisco.com ([173.37.86.73]:55606 "EHLO rcdn-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbhCIV3s (ORCPT ); Tue, 9 Mar 2021 16:29:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2621; q=dns/txt; s=iport; t=1615325388; x=1616534988; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=P29McQ6d/QFxrQq1EYKN884pwFzgqSORJbOcG1OnGCA=; b=cXhxfCHtcP4ljwBOVNCPmiajlNLRlQkZyDAByml5gqHPiFeE19Otg9PO YrIdp0w4hV9/0NZrwRG5Tw87Lvm6pQx2svPHKdU7cOKg4yVnj5mmF6DnX 7HkwB/f93cxuLquhTitX5vQMhuYmn2RbkbAdkfSS8COGC9dnTSnEF5Bor 8=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BqAAC/50dg/40NJK1aHAEBAQEBAQc?= =?us-ascii?q?BARIBAQQEAQFAgTsHAQELAQGBdDWBTAE5jRaJPI9zilaBfAsBAQENAQE0BAE?= =?us-ascii?q?BgRSDNAMCAoF+AiU0CQ4CAwEBCwEBBQEBAQIBBgRxhW5DAQwBCAGFawEFMgF?= =?us-ascii?q?GEAsYLjwbBoYLrGd0gTSJEYFFFA6BFwGNQiYcgUlChCw+ihAiBIJGgRBLPXx?= =?us-ascii?q?XkSqMcJpwgRSDCYEfmnsxEKNitx8CBAYFAhaBVDqBVzMaCBsVgyVPGQ2OKxa?= =?us-ascii?q?ORyADZwIGAQkBAQMJhiCEEIM4AQE?= X-IronPort-AV: E=Sophos;i="5.81,236,1610409600"; d="scan'208";a="874107942" Received: from alln-core-8.cisco.com ([173.36.13.141]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 09 Mar 2021 21:29:47 +0000 Received: from zorba ([10.24.4.5]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTPS id 129LTj55006364 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 Mar 2021 21:29:46 GMT Date: Tue, 9 Mar 2021 13:29:44 -0800 From: Daniel Walker To: Christophe Leroy Cc: Will Deacon , Rob Herring , Daniel Gimpelevich , Andrew Morton , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, xe-linux-external@cisco.com, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline Message-ID: <20210309212944.GR109100@zorba> References: <20210309000247.2989531-4-danielwa@cisco.com> <5f865584-09c9-d21f-ffb7-23cf07cf058e@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5f865584-09c9-d21f-ffb7-23cf07cf058e@csgroup.eu> X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.24.4.5, [10.24.4.5] X-Outbound-Node: alln-core-8.cisco.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 09, 2021 at 08:47:09AM +0100, Christophe Leroy wrote: > > > Le 09/03/2021 ? 01:02, Daniel Walker a ?crit?: > > This is a scripted mass convert of the config files to use > > the new generic cmdline. There is a bit of a trim effect here. > > It would seems that some of the config haven't been trimmed in > > a while. > > If you do that in a separate patch, you loose bisectability. > > I think it would have been better to do things in a different way, more or less like I did in my series: > 1/ Provide GENERIC cmdline at the same functionnality level as what is > spread in the different architectures > 2/ Convert architectures to the generic with least churn. > 3/ Add new features to the generic You have to have the churn eventually, no matter how you do it. The only way you don't have churn is if you never upgrade the feature set. > > > > The bash script used to convert is as follows, > > > > if [[ -z "$1" || -z "$2" ]]; then > > echo "Two arguments are needed." > > exit 1 > > fi > > mkdir $1 > > cp $2 $1/.config > > sed -i 's/CONFIG_CMDLINE=/CONFIG_CMDLINE_BOOL=y\nCONFIG_CMDLINE_PREPEND=/g' $1/.config > > This is not correct. > > By default, on powerpc the provided command line is used only if the bootloader doesn't provide one. > > Otherwise: > - the builtin command line is appended to the one provided by the bootloader > if CONFIG_CMDLINE_EXTEND is selected > - the builtin command line replaces to the one provided by the bootloader if > CONFIG_CMDLINE_FORCE is selected I think my changes maintain most of this due to the override of CONFIG_CMDLINE_PREPEND. This is an upgrade and the inflexibility in powerpc is an example of why these changes were created in the first place. For example , say the default command line is "root=/dev/issblk0" from iss476 platform. And the bootloader adds "root=/dev/sda1" The result is . Then you have, root=/dev/issblk0 root=/dev/sda1 and the bootloader has precedent over the default command line. So root= in the above cases is defined by the bootloader. The only issue would be if a person wants to override the default command line with an unrelated bootloader command line. I don't know how many people do this, but I doubt it's many. Can you think of any use cases like this? I would imagine there are many more people who have to entirely duplicate the default command line in the boot loader when they really just want to change a single part of it like the root= device or console device or speed. Daniel