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 43D1AC43460 for ; Tue, 20 Apr 2021 16:05:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F771613D2 for ; Tue, 20 Apr 2021 16:05:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F771613D2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB7D66B006C; Tue, 20 Apr 2021 12:05:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C69366B006E; Tue, 20 Apr 2021 12:05:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B08ED6B0070; Tue, 20 Apr 2021 12:05:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 93AE06B006C for ; Tue, 20 Apr 2021 12:05:50 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5109C2C94 for ; Tue, 20 Apr 2021 16:05:50 +0000 (UTC) X-FDA: 78053221260.37.F0C2DE9 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf20.hostedemail.com (Postfix) with ESMTP id 71A6CFD for ; Tue, 20 Apr 2021 16:05:42 +0000 (UTC) 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 X-Stat-Signature: uou66n4qj3o4aspedyrg9tccx4eg8phy X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 71A6CFD Received-SPF: none (csgroup.eu>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=pegase1.c-s.fr; client-ip=93.17.236.30 X-HE-DKIM-Result: none/none X-HE-Tag: 1618934742-189664 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Le 09/04/2021 =C3=A0 03:23, Daniel Walker a =C3=A9crit=C2=A0: > 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 bootloade= r. >>>> - >>> >>> >>> See how you complained that I have CMDLINE_BOOL in my changed, and yo= u 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. Y= ou >> seem to need it just because you have CMDLINE_PREPEND and >> CMDLINE_APPEND. If that's not it, what feature is missing? CMDLINE_BOO= L >> is not a feature, but an implementation detail. >=20 > Not true. >=20 > 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 comme= nting > here. >=20 Among the 13 architectures having CONFIG_CMDLINE, todayb only 6 have a CO= NFIG_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=20 is done today in the kernel for initramfs with CONFIG_INITRAMFS_SOURCE. The problem I see within adding CONFIG_CMDLINE_BOOL for every architectur= e which don't have it today=20 is that when doing a "make oldconfig" on their custom configs, thousands = of users will loose their=20 CMDLINE without notice. When we do the other way round, removing CONFIG_CMDLINE_BOOL on the 6 arc= hitectures that have it=20 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 =C2=A721, we have=20 to have CONFIG_CMDLINE defined at all time, so at the end CONFIG_CMDLINE_= BOOL is really redundant=20 with an empty CONFIG_CMDLINE. Unlike you, the approach I took for my series is to minimise the impact o= n existing implementation=20 and existing configurations as much as possible. I know you have a different approach where you break every existing confi= g anyway. https://www.kernel.org/doc/html/latest/process/coding-style.html#conditio= nal-compilation Christophe