Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp542387pxf; Wed, 24 Mar 2021 10:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/J7BPc3JhqlrBgJ5HXFx6EvlSyF1Cft2mwT8y00IFLzsTSmOaH7rPFogHR3ae8w4u0r+S X-Received: by 2002:a17:906:6a06:: with SMTP id o6mr4685764ejr.306.1616605390240; Wed, 24 Mar 2021 10:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616605390; cv=none; d=google.com; s=arc-20160816; b=Ke77RTv2EbKvW5/sNOe8tB/zolxhTvKvW4AHvMHxZkAeteDKWlnCWBGWXuv1pcTNdn Aihr1RNgElaXDwFVDvERfHtEpzq9HpSN7G/f18UN3izUuCfElwh99sFUWoW41Zr71qjU VmKHJO1LYOiJ2teeLC7RByEk4icgKCFDwvlzTJeKskutZzPgfDImgioGFEVPuCeO1RQ6 o8s0NEAhBDpi6uiTYdMV3kNJ/0l75UUbz3NKqRsHrcLmFTllrMW1w8XkjP2ErsnjCxWj a4NVzbZj+ZZRHpoHdWQ05JKrRAZSCfLwSP+sxPK9PJxWm/+5e59mjSRK/UAG8Flgk+0r tDGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=6JeMevM3JnwBDMJNJLe58wGNUbbrgDhhxhiQIVm8ftc=; b=QXvpwnFz/KGya+PDd9DMgQt8tyUGeHAID6czLaAdmSrZxKZ12ARB1ESfUjFPzoMvOU bLmLPELE5HSaVtDLihqf2MqPFBmUQPkoQJSojFxLJjvHgsB6vsWhCc1vn2TrOdhLnUCN qrYuPbE0mOG6eINNdBbIi54+Jh25gQBXrrwVanuqmyN907v5yQR7YyJA/IEXa+Wr07YF X2ipdbaelvrCdKtGY7W8Y20Mn/aAaehYoWdpDubQWTcvdT1mzGTY/9VJYXCbCJZm6LMj kiudNofvnJ5npSJZFqgFa6nCwC7TJKx99Selp7T+k1ya3APNw23zJuF1hKhvGsRabpJv 2T6g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si2280740eds.593.2021.03.24.10.02.45; Wed, 24 Mar 2021 10:03:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237023AbhCXRBk (ORCPT + 99 others); Wed, 24 Mar 2021 13:01:40 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:28511 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236988AbhCXRBF (ORCPT ); Wed, 24 Mar 2021 13:01:05 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4F5Dyg2yVdz9tyfd; Wed, 24 Mar 2021 18:00:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id hMuZCLVXRcCR; Wed, 24 Mar 2021 18:00:59 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4F5Dyg1vd9z9tyfc; Wed, 24 Mar 2021 18:00:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 765D78B82C; Wed, 24 Mar 2021 18:01:00 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id uqfRv-8BUINu; Wed, 24 Mar 2021 18:01:00 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 997938B82B; Wed, 24 Mar 2021 18:00:59 +0100 (CET) Subject: Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline To: Daniel Walker 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 References: <20210309000247.2989531-4-danielwa@cisco.com> <5f865584-09c9-d21f-ffb7-23cf07cf058e@csgroup.eu> <20210309212944.GR109100@zorba> From: Christophe Leroy Message-ID: Date: Wed, 24 Mar 2021 17:59:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210309212944.GR109100@zorba> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/03/2021 à 22:29, Daniel Walker a écrit : > 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. "inflexibility in powerpc" : Can you elaborate ? > > For example , say the default command line is "root=/dev/issblk0" from iss476 > platform. And the bootloader adds "root=/dev/sda1" > > The result is . I'm still having hard time understanding the benefit of having both and . Could you please provide a complete exemple from real life, ie what exactly the problem is and what it solves ? > > 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 > Christophe