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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8A7BAC43461 for ; Tue, 20 Apr 2021 16:05:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6957161003 for ; Tue, 20 Apr 2021 16:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233060AbhDTQGW (ORCPT ); Tue, 20 Apr 2021 12:06:22 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:23168 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232174AbhDTQGV (ORCPT ); Tue, 20 Apr 2021 12:06:21 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FPpST5fYSz9tyMJ; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 6qTfVqAOsH66; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 4FPpST4Shgz9tyMF; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2B5AD8B807; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) 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 ZiEcE-0Tlz-R; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0267E8B7ED; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Subject: Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE To: Daniel Walker , Rob Herring Cc: will@kernel.org, daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org, akpm@linux-foundation.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, microblaze , linux-mips@vger.kernel.org, nios2 , openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org References: <20210406173836.GW2469518@zorba> <20210408190408.GA1724284@robh.at.kernel.org> <20210409012349.GG3981976@zorba> From: Christophe Leroy Message-ID: Date: Tue, 20 Apr 2021 18:05:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210409012349.GG3981976@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-sh@vger.kernel.org Le 09/04/2021 à 03:23, Daniel Walker a écrit : > On Thu, Apr 08, 2021 at 02:04:08PM -0500, Rob Herring wrote: >> On Tue, Apr 06, 2021 at 10:38:36AM -0700, Daniel Walker wrote: >>> On Fri, Apr 02, 2021 at 03:18:21PM +0000, Christophe Leroy wrote: >>>> -config CMDLINE_BOOL >>>> - bool "Built-in kernel command line" >>>> - help >>>> - For most systems, it is firmware or second stage bootloader that >>>> - by default specifies the kernel command line options. However, >>>> - it might be necessary or advantageous to either override the >>>> - default kernel command line or add a few extra options to it. >>>> - For such cases, this option allows you to hardcode your own >>>> - command line options directly into the kernel. For that, you >>>> - should choose 'Y' here, and fill in the extra boot arguments >>>> - in CONFIG_CMDLINE. >>>> - >>>> - The built-in options will be concatenated to the default command >>>> - line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default >>>> - command line will be ignored and replaced by the built-in string. >>>> - >>>> - Most MIPS systems will normally expect 'N' here and rely upon >>>> - the command line from the firmware or the second-stage bootloader. >>>> - >>> >>> >>> See how you complained that I have CMDLINE_BOOL in my changed, and you think it >>> shouldn't exist. >>> >>> Yet here mips has it, and you just deleted it with no feature parity in your >>> changes for this. >> >> AFAICT, CMDLINE_BOOL equates to a non-empty or empty CONFIG_CMDLINE. You >> seem to need it just because you have CMDLINE_PREPEND and >> CMDLINE_APPEND. If that's not it, what feature is missing? CMDLINE_BOOL >> is not a feature, but an implementation detail. > > Not true. > > It makes it easier to turn it all off inside the Kconfig , so it's for usability > and multiple architecture have it even with just CMDLINE as I was commenting > here. > Among the 13 architectures having CONFIG_CMDLINE, todayb only 6 have a CONFIG_CMDLINE_BOOL in addition: arch/arm/Kconfig:config CMDLINE arch/arm64/Kconfig:config CMDLINE arch/hexagon/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE arch/mips/Kconfig.debug:config CMDLINE arch/nios2/Kconfig:config CMDLINE arch/openrisc/Kconfig:config CMDLINE arch/powerpc/Kconfig:config CMDLINE arch/riscv/Kconfig:config CMDLINE arch/sh/Kconfig:config CMDLINE arch/sparc/Kconfig:config CMDLINE arch/x86/Kconfig:config CMDLINE arch/xtensa/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE_BOOL arch/mips/Kconfig.debug:config CMDLINE_BOOL arch/nios2/Kconfig:config CMDLINE_BOOL arch/sparc/Kconfig:config CMDLINE_BOOL arch/x86/Kconfig:config CMDLINE_BOOL arch/xtensa/Kconfig:config CMDLINE_BOOL In the begining I hesitated about the CMDLINE_BOOL, at the end I decided to go the same way as what is done today in the kernel for initramfs with CONFIG_INITRAMFS_SOURCE. The problem I see within adding CONFIG_CMDLINE_BOOL for every architecture which don't have it today is that when doing a "make oldconfig" on their custom configs, thousands of users will loose their CMDLINE without notice. When we do the other way round, removing CONFIG_CMDLINE_BOOL on the 6 architectures that have it today will have no impact on existing config. Also, in order to avoid tons of #ifdefs in the code as mandated by Kernel Codying Style §21, we have to have CONFIG_CMDLINE defined at all time, so at the end CONFIG_CMDLINE_BOOL is really redundant with an empty CONFIG_CMDLINE. Unlike you, the approach I took for my series is to minimise the impact on existing implementation and existing configurations as much as possible. I know you have a different approach where you break every existing config anyway. https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation Christophe 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 33D10C433B4 for ; Tue, 20 Apr 2021 16:06:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 6C42B613C0 for ; Tue, 20 Apr 2021 16:06:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C42B613C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tugVarTH4oC1nTDomaZYyJnRd3YpkYm81QmHOSsxAho=; b=KC1rlUxGobs6L8W9R0OJV3jZS BrTB10YzfgX0Nl4cKOJ/xgXhmG6sqITsWH0y+rnbawAlBoewuTUputSURcREqUtgwudukRkbeIgUu SKjNRmsyetK43b1R0jbOk+D0sXVgKXr5A65Up43Q6vRfKtQeyKjG91XHRG4J1zFh7Hx+dk7Isu7vY GyzsWPYjERUW/fLEvOeZ2r7aer66n0Is437VU6bsaJLIq52C5utqAy4MScRlYEtMtrYch0KMaqa7m lL7w+QOV/vsZAXLa+zjKcogxz3ZYFTevhOHI5vAsATgsjHij4wvXnukTwtliCtl3HT10qJpBBgBva j4YPDQMwA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYstH-00CXXc-Ak; Tue, 20 Apr 2021 16:06:19 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYst4-00CXVe-3W; Tue, 20 Apr 2021 16:06:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=UuaDWieSiFr1eDV/8FBDML1WGhqyaiBzxVcGBAuLXYE=; b=UOP/i6/ZZCZOUceNge5Q568SNo Xb1bYvTp+ZWtzsb7scdhqyPtHCgX8HTxp4ci6i6YQHKOwSuTs+1qFnefVFSf24NNKDZNmQOZzm2hA 1flYoKRR15p+iDgTR2b0lLktrK6m8ATRZp+64sbTRWjau+CWzOfZBTccXQNgPaZ4xksfa4ujsUhjO bEWW6MiBoqmlvH85D18Ggh44YTK8fh76nW6OqqtUke1CnVs+OWsvK05d8d4acAjJQc7bfIkFFhj/b JihxCfvTGsmN7vhWjFjxBBlAs1ls++SKlrlyx7hfipMK/9bNggZ+aPUKqXZXsC6/pgV10HweLh8K+ M+J3H2Ag==; Received: from pegase1.c-s.fr ([93.17.236.30]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYssx-00CG04-Lo; Tue, 20 Apr 2021 16:06:04 +0000 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FPpST5fYSz9tyMJ; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 6qTfVqAOsH66; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 4FPpST4Shgz9tyMF; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2B5AD8B807; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) 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 ZiEcE-0Tlz-R; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0267E8B7ED; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Subject: Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE To: Daniel Walker , Rob Herring Cc: will@kernel.org, daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org, akpm@linux-foundation.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, microblaze , linux-mips@vger.kernel.org, nios2 , openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org References: <20210406173836.GW2469518@zorba> <20210408190408.GA1724284@robh.at.kernel.org> <20210409012349.GG3981976@zorba> From: Christophe Leroy Message-ID: Date: Tue, 20 Apr 2021 18:05:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210409012349.GG3981976@zorba> Content-Language: fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210420_090600_041704_83B96186 X-CRM114-Status: GOOD ( 21.01 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-risc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bGludXgtcmlzY3YK 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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 9EBBAC433ED for ; Tue, 20 Apr 2021 16:06:17 +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 553D6613C3 for ; Tue, 20 Apr 2021 16:06:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 553D6613C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu 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 4FPpT21xv0z302Y for ; Wed, 21 Apr 2021 02:06:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=93.17.236.30; helo=pegase1.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FPpSf34DYz2xZn for ; Wed, 21 Apr 2021 02:05:50 +1000 (AEST) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FPpST5fYSz9tyMJ; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 6qTfVqAOsH66; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 4FPpST4Shgz9tyMF; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2B5AD8B807; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) 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 ZiEcE-0Tlz-R; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0267E8B7ED; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Subject: Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE To: Daniel Walker , Rob Herring References: <20210406173836.GW2469518@zorba> <20210408190408.GA1724284@robh.at.kernel.org> <20210409012349.GG3981976@zorba> From: Christophe Leroy Message-ID: Date: Tue, 20 Apr 2021 18:05:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210409012349.GG3981976@zorba> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit 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: linux-arch@vger.kernel.org, arnd@kernel.org, microblaze , daniel@gimpelevich.san-francisco.ca.us, devicetree@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, linux-kernel@vger.kernel.org, nios2 , linux-mips@vger.kernel.org, linux-mm@kvack.org, openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org, sparclinux@vger.kernel.org, akpm@linux-foundation.org, will@kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Le 09/04/2021 à 03:23, Daniel Walker a écrit : > On Thu, Apr 08, 2021 at 02:04:08PM -0500, Rob Herring wrote: >> On Tue, Apr 06, 2021 at 10:38:36AM -0700, Daniel Walker wrote: >>> On Fri, Apr 02, 2021 at 03:18:21PM +0000, Christophe Leroy wrote: >>>> -config CMDLINE_BOOL >>>> - bool "Built-in kernel command line" >>>> - help >>>> - For most systems, it is firmware or second stage bootloader that >>>> - by default specifies the kernel command line options. However, >>>> - it might be necessary or advantageous to either override the >>>> - default kernel command line or add a few extra options to it. >>>> - For such cases, this option allows you to hardcode your own >>>> - command line options directly into the kernel. For that, you >>>> - should choose 'Y' here, and fill in the extra boot arguments >>>> - in CONFIG_CMDLINE. >>>> - >>>> - The built-in options will be concatenated to the default command >>>> - line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default >>>> - command line will be ignored and replaced by the built-in string. >>>> - >>>> - Most MIPS systems will normally expect 'N' here and rely upon >>>> - the command line from the firmware or the second-stage bootloader. >>>> - >>> >>> >>> See how you complained that I have CMDLINE_BOOL in my changed, and you think it >>> shouldn't exist. >>> >>> Yet here mips has it, and you just deleted it with no feature parity in your >>> changes for this. >> >> AFAICT, CMDLINE_BOOL equates to a non-empty or empty CONFIG_CMDLINE. You >> seem to need it just because you have CMDLINE_PREPEND and >> CMDLINE_APPEND. If that's not it, what feature is missing? CMDLINE_BOOL >> is not a feature, but an implementation detail. > > Not true. > > It makes it easier to turn it all off inside the Kconfig , so it's for usability > and multiple architecture have it even with just CMDLINE as I was commenting > here. > Among the 13 architectures having CONFIG_CMDLINE, todayb only 6 have a CONFIG_CMDLINE_BOOL in addition: arch/arm/Kconfig:config CMDLINE arch/arm64/Kconfig:config CMDLINE arch/hexagon/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE arch/mips/Kconfig.debug:config CMDLINE arch/nios2/Kconfig:config CMDLINE arch/openrisc/Kconfig:config CMDLINE arch/powerpc/Kconfig:config CMDLINE arch/riscv/Kconfig:config CMDLINE arch/sh/Kconfig:config CMDLINE arch/sparc/Kconfig:config CMDLINE arch/x86/Kconfig:config CMDLINE arch/xtensa/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE_BOOL arch/mips/Kconfig.debug:config CMDLINE_BOOL arch/nios2/Kconfig:config CMDLINE_BOOL arch/sparc/Kconfig:config CMDLINE_BOOL arch/x86/Kconfig:config CMDLINE_BOOL arch/xtensa/Kconfig:config CMDLINE_BOOL In the begining I hesitated about the CMDLINE_BOOL, at the end I decided to go the same way as what is done today in the kernel for initramfs with CONFIG_INITRAMFS_SOURCE. The problem I see within adding CONFIG_CMDLINE_BOOL for every architecture which don't have it today is that when doing a "make oldconfig" on their custom configs, thousands of users will loose their CMDLINE without notice. When we do the other way round, removing CONFIG_CMDLINE_BOOL on the 6 architectures that have it today will have no impact on existing config. Also, in order to avoid tons of #ifdefs in the code as mandated by Kernel Codying Style §21, we have to have CONFIG_CMDLINE defined at all time, so at the end CONFIG_CMDLINE_BOOL is really redundant with an empty CONFIG_CMDLINE. Unlike you, the approach I took for my series is to minimise the impact on existing implementation and existing configurations as much as possible. I know you have a different approach where you break every existing config anyway. https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation Christophe 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 9210EC433B4 for ; Tue, 20 Apr 2021 16:08:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D414A613C0 for ; Tue, 20 Apr 2021 16:08:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D414A613C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IT/TZZzL2hI3FU3wZlkj5BoRsIgqsJ+VUue0PGky6t0=; b=RpOzqcpfO+AHqYBrpfeC6e376 0trPMWQcJqc7z2KHCMx/+X8Rxm4oaxNSWF0jvMO+q4vJZhlaPs7A1BdLEoQzMexaJM3SUK77TUyvs MSnsd4BSonBcn+U9nBZPGAH2DNFQ/qu4jgrDkhXSgBc1uFH+PqHiXl3CRtfjY0M4P18E41mEOmltU WEu/8uLswlhUIaR3IDudIsLZ/zb1LytNJ7Itus5nHdJRRl99P2b72a+BMdieKSXl4SuLtJR2m0fgH sN4FQKUgRuURd084mM0luSPlqygqSWa0kNRTrD/0vPqX+qPZ/7dLtmf32wWaP+lu1Q1jkzDjQMAiy YK7QeM4Qw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYst7-00CXW8-4F; Tue, 20 Apr 2021 16:06:09 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYst4-00CXVe-3W; Tue, 20 Apr 2021 16:06:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=UuaDWieSiFr1eDV/8FBDML1WGhqyaiBzxVcGBAuLXYE=; b=UOP/i6/ZZCZOUceNge5Q568SNo Xb1bYvTp+ZWtzsb7scdhqyPtHCgX8HTxp4ci6i6YQHKOwSuTs+1qFnefVFSf24NNKDZNmQOZzm2hA 1flYoKRR15p+iDgTR2b0lLktrK6m8ATRZp+64sbTRWjau+CWzOfZBTccXQNgPaZ4xksfa4ujsUhjO bEWW6MiBoqmlvH85D18Ggh44YTK8fh76nW6OqqtUke1CnVs+OWsvK05d8d4acAjJQc7bfIkFFhj/b JihxCfvTGsmN7vhWjFjxBBlAs1ls++SKlrlyx7hfipMK/9bNggZ+aPUKqXZXsC6/pgV10HweLh8K+ M+J3H2Ag==; Received: from pegase1.c-s.fr ([93.17.236.30]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYssx-00CG04-Lo; Tue, 20 Apr 2021 16:06:04 +0000 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FPpST5fYSz9tyMJ; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 6qTfVqAOsH66; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) 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 4FPpST4Shgz9tyMF; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2B5AD8B807; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) 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 ZiEcE-0Tlz-R; Tue, 20 Apr 2021 18:05:47 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0267E8B7ED; Tue, 20 Apr 2021 18:05:45 +0200 (CEST) Subject: Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE To: Daniel Walker , Rob Herring Cc: will@kernel.org, daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org, akpm@linux-foundation.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, microblaze , linux-mips@vger.kernel.org, nios2 , openrisc@lists.librecores.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org References: <20210406173836.GW2469518@zorba> <20210408190408.GA1724284@robh.at.kernel.org> <20210409012349.GG3981976@zorba> From: Christophe Leroy Message-ID: Date: Tue, 20 Apr 2021 18:05:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210409012349.GG3981976@zorba> Content-Language: fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210420_090600_041704_83B96186 X-CRM114-Status: GOOD ( 21.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CgpMZSAwOS8wNC8yMDIxIMOgIDAzOjIzLCBEYW5pZWwgV2Fsa2VyIGEgw6ljcml0wqA6Cj4gT24g VGh1LCBBcHIgMDgsIDIwMjEgYXQgMDI6MDQ6MDhQTSAtMDUwMCwgUm9iIEhlcnJpbmcgd3JvdGU6 Cj4+IE9uIFR1ZSwgQXByIDA2LCAyMDIxIGF0IDEwOjM4OjM2QU0gLTA3MDAsIERhbmllbCBXYWxr ZXIgd3JvdGU6Cj4+PiBPbiBGcmksIEFwciAwMiwgMjAyMSBhdCAwMzoxODoyMVBNICswMDAwLCBD aHJpc3RvcGhlIExlcm95IHdyb3RlOgo+Pj4+IC1jb25maWcgQ01ETElORV9CT09MCj4+Pj4gLQli b29sICJCdWlsdC1pbiBrZXJuZWwgY29tbWFuZCBsaW5lIgo+Pj4+IC0JaGVscAo+P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VudGluZwo+IGhlcmUuCj4gCgpBbW9uZyB0aGUgMTMg YXJjaGl0ZWN0dXJlcyBoYXZpbmcgQ09ORklHX0NNRExJTkUsIHRvZGF5YiBvbmx5IDYgaGF2ZSBh IENPTkZJR19DTURMSU5FX0JPT0wgaW4gYWRkaXRpb246CgphcmNoL2FybS9LY29uZmlnOmNvbmZp ZyBDTURMSU5FCmFyY2gvYXJtNjQvS2NvbmZpZzpjb25maWcgQ01ETElORQphcmNoL2hleGFnb24v S2NvbmZpZzpjb25maWcgQ01ETElORQphcmNoL21pY3JvYmxhemUvS2NvbmZpZzpjb25maWcgQ01E TElORQphcmNoL21pcHMvS2NvbmZpZy5kZWJ1Zzpjb25maWcgQ01ETElORQphcmNoL25pb3MyL0tj b25maWc6Y29uZmlnIENNRExJTkUKYXJjaC9vcGVucmlzYy9LY29uZmlnOmNvbmZpZyBDTURMSU5F CmFyY2gvcG93ZXJwYy9LY29uZmlnOmNvbmZpZyBDTURMSU5FCmFyY2gvcmlzY3YvS2NvbmZpZzpj b25maWcgQ01ETElORQphcmNoL3NoL0tjb25maWc6Y29uZmlnIENNRExJTkUKYXJjaC9zcGFyYy9L Y29uZmlnOmNvbmZpZyBDTURMSU5FCmFyY2gveDg2L0tjb25maWc6Y29uZmlnIENNRExJTkUKYXJj aC94dGVuc2EvS2NvbmZpZzpjb25maWcgQ01ETElORQoKYXJjaC9taWNyb2JsYXplL0tjb25maWc6 Y29uZmlnIENNRExJTkVfQk9PTAphcmNoL21pcHMvS2NvbmZpZy5kZWJ1Zzpjb25maWcgQ01ETElO RV9CT09MCmFyY2gvbmlvczIvS2NvbmZpZzpjb25maWcgQ01ETElORV9CT09MCmFyY2gvc3BhcmMv S2NvbmZpZzpjb25maWcgQ01ETElORV9CT09MCmFyY2gveDg2L0tjb25maWc6Y29uZmlnIENNRExJ TkVfQk9PTAphcmNoL3h0ZW5zYS9LY29uZmlnOmNvbmZpZyBDTURMSU5FX0JPT0wKCgpJbiB0aGUg YmVnaW5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Zm9yIG15IHNlcmllcyBpcyB0byBtaW5pbWlzZSB0aGUgaW1wYWN0IG9uIGV4aXN0aW5n IGltcGxlbWVudGF0aW9uIAphbmQgZXhpc3RpbmcgY29uZmlndXJhdGlvbnMgYXMgbXVjaCBhcyBw b3NzaWJsZS4KCkkga25vdyB5b3UgaGF2ZSBhIGRpZmZlcmVudCBhcHByb2FjaCB3aGVyZSB5b3Ug YnJlYWsgZXZlcnkgZXhpc3RpbmcgY29uZmlnIGFueXdheS4KCmh0dHBzOi8vd3d3Lmtlcm5lbC5v cmcvZG9jL2h0bWwvbGF0ZXN0L3Byb2Nlc3MvY29kaW5nLXN0eWxlLmh0bWwjY29uZGl0aW9uYWwt Y29tcGlsYXRpb24KCkNocmlzdG9waGUKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fCmxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0CmxpbnV4LWFybS1r ZXJuZWxAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWls bWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Leroy Date: Tue, 20 Apr 2021 18:05:44 +0200 Subject: [OpenRISC] [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE In-Reply-To: <20210409012349.GG3981976@zorba> References: <20210406173836.GW2469518@zorba> <20210408190408.GA1724284@robh.at.kernel.org> <20210409012349.GG3981976@zorba> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openrisc@lists.librecores.org Le 09/04/2021 à 03:23, Daniel Walker a écrit : > On Thu, Apr 08, 2021 at 02:04:08PM -0500, Rob Herring wrote: >> On Tue, Apr 06, 2021 at 10:38:36AM -0700, Daniel Walker wrote: >>> On Fri, Apr 02, 2021 at 03:18:21PM +0000, Christophe Leroy wrote: >>>> -config CMDLINE_BOOL >>>> - bool "Built-in kernel command line" >>>> - help >>>> - For most systems, it is firmware or second stage bootloader that >>>> - by default specifies the kernel command line options. However, >>>> - it might be necessary or advantageous to either override the >>>> - default kernel command line or add a few extra options to it. >>>> - For such cases, this option allows you to hardcode your own >>>> - command line options directly into the kernel. For that, you >>>> - should choose 'Y' here, and fill in the extra boot arguments >>>> - in CONFIG_CMDLINE. >>>> - >>>> - The built-in options will be concatenated to the default command >>>> - line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default >>>> - command line will be ignored and replaced by the built-in string. >>>> - >>>> - Most MIPS systems will normally expect 'N' here and rely upon >>>> - the command line from the firmware or the second-stage bootloader. >>>> - >>> >>> >>> See how you complained that I have CMDLINE_BOOL in my changed, and you think it >>> shouldn't exist. >>> >>> Yet here mips has it, and you just deleted it with no feature parity in your >>> changes for this. >> >> AFAICT, CMDLINE_BOOL equates to a non-empty or empty CONFIG_CMDLINE. You >> seem to need it just because you have CMDLINE_PREPEND and >> CMDLINE_APPEND. If that's not it, what feature is missing? CMDLINE_BOOL >> is not a feature, but an implementation detail. > > Not true. > > It makes it easier to turn it all off inside the Kconfig , so it's for usability > and multiple architecture have it even with just CMDLINE as I was commenting > here. > Among the 13 architectures having CONFIG_CMDLINE, todayb only 6 have a CONFIG_CMDLINE_BOOL in addition: arch/arm/Kconfig:config CMDLINE arch/arm64/Kconfig:config CMDLINE arch/hexagon/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE arch/mips/Kconfig.debug:config CMDLINE arch/nios2/Kconfig:config CMDLINE arch/openrisc/Kconfig:config CMDLINE arch/powerpc/Kconfig:config CMDLINE arch/riscv/Kconfig:config CMDLINE arch/sh/Kconfig:config CMDLINE arch/sparc/Kconfig:config CMDLINE arch/x86/Kconfig:config CMDLINE arch/xtensa/Kconfig:config CMDLINE arch/microblaze/Kconfig:config CMDLINE_BOOL arch/mips/Kconfig.debug:config CMDLINE_BOOL arch/nios2/Kconfig:config CMDLINE_BOOL arch/sparc/Kconfig:config CMDLINE_BOOL arch/x86/Kconfig:config CMDLINE_BOOL arch/xtensa/Kconfig:config CMDLINE_BOOL In the begining I hesitated about the CMDLINE_BOOL, at the end I decided to go the same way as what is done today in the kernel for initramfs with CONFIG_INITRAMFS_SOURCE. The problem I see within adding CONFIG_CMDLINE_BOOL for every architecture which don't have it today is that when doing a "make oldconfig" on their custom configs, thousands of users will loose their CMDLINE without notice. When we do the other way round, removing CONFIG_CMDLINE_BOOL on the 6 architectures that have it today will have no impact on existing config. Also, in order to avoid tons of #ifdefs in the code as mandated by Kernel Codying Style §21, we have to have CONFIG_CMDLINE defined at all time, so at the end CONFIG_CMDLINE_BOOL is really redundant with an empty CONFIG_CMDLINE. Unlike you, the approach I took for my series is to minimise the impact on existing implementation and existing configurations as much as possible. I know you have a different approach where you break every existing config anyway. https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation Christophe