Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1359862pxf; Fri, 2 Apr 2021 08:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfv6sDQNO6Q4pKRo5ubGBUkW2wX7acYZtaMCsAuPra88zY2umBX8B4OUjZ/BAszHa6vYZ2 X-Received: by 2002:a17:906:ce4e:: with SMTP id se14mr1350168ejb.54.1617377095309; Fri, 02 Apr 2021 08:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617377095; cv=none; d=google.com; s=arc-20160816; b=1D7Uq3yPqTFcW8GZ4xs/gmbOYIrg2FqeAGtY+hHyvbvEB3bk89o2VNF/uOkwpcVEXo trweTf5c+ucyZ+Ij08dIofvlIF25TwC/CawO6QjndMgjtU/QmpvrG3bu5u1DE5ciX0jo ofqhc/Zr6qYhutzgwdVcODxo+CnadDrXbTiynl0w0k/wJILb6qyxBVWtb3nSXjc0aVBc buobjZRIDeb4UdoXSnz+uU+/1iTy0QoiTNdgvhiLYRSAMyb/bQc/Su7sqEjZ0qVTwpsx GKKFgKOlU+dYlotv22B7BpHfPc9Hgpum+cTPmg9TfAoSKXYJr6Vis6qTwTA+eIQPp1lO wwkA== 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=g0/tYin1VZPpBotb2LmhLrOF2J8YQnxw5UbSc+hQBzU=; b=GlbSdeJAL8apm2nwE1GOxyx4rfOoan7rrNrGrA7LpoMPyd3GwaICUbyfHh97VV+8yP f0Gg87RZ5DgrJtym2m+k0k/TjXbmz21aYZEjx3Z6+984MYIrIp64MFHZyyr3N+zddaNK sk+Jg0brwtBycxfXC3qfg/NDznfMwlRW17yDS9rQ+IuhVi5DlZaHFX+CYet3nAjXcdE9 C4Y8m480zjtHrzzyDetmAfqllhof9nAjy7uElpDmNWF3ZwMwR2F4G51cE77QuRRI8PHH 40vY4pnYHfjJQdNgKKvYEItUqD8yG86bfJ6Y2n7CQ7dPx4RfNPlitbFgpekypLIgIoeq 7iwQ== 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 s15si1035307ejm.116.2021.04.02.08.24.30; Fri, 02 Apr 2021 08:24:55 -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 S236027AbhDBPVz (ORCPT + 99 others); Fri, 2 Apr 2021 11:21:55 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:8919 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234968AbhDBPVy (ORCPT ); Fri, 2 Apr 2021 11:21:54 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FBkL51pq3z9v2lh; Fri, 2 Apr 2021 17:21:49 +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 OssVJYy-p_xH; Fri, 2 Apr 2021 17:21:49 +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 4FBkL50gT0z9v2lf; Fri, 2 Apr 2021 17:21:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 155BE8BB7D; Fri, 2 Apr 2021 17:21:51 +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 6n2Gg89KkRnV; Fri, 2 Apr 2021 17:21:51 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1C4F58BB7C; Fri, 2 Apr 2021 17:21:50 +0200 (CEST) Subject: Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE To: Rob Herring Cc: Andreas Schwab , Will Deacon , Daniel Walker , Daniel Gimpelevich , "open list:GENERIC INCLUDE/ASM HEADER FILES" , devicetree@vger.kernel.org, linuxppc-dev , "linux-kernel@vger.kernel.org" , linux-arm-kernel , microblaze , "open list:MIPS" , nios2 , Openrisc , linux-hexagon@vger.kernel.org, linux-riscv , X86 ML , linux-xtensa@linux-xtensa.org, SH-Linux , sparclinux References: <46745e07b04139a22b5bd01dc37df97e6981e643.1616765870.git.christophe.leroy@csgroup.eu> <87zgyqdn3d.fsf@igel.home> <81a7e63f-57d4-5c81-acc5-35278fe5bb04@csgroup.eu> From: Christophe Leroy Message-ID: Date: Fri, 2 Apr 2021 17:21:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: 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 26/03/2021 à 16:26, Rob Herring a écrit : > On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy > wrote: >> >> >> >> Le 26/03/2021 à 15:08, Andreas Schwab a écrit : >>> On Mär 26 2021, Christophe Leroy wrote: >>> >>>> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c >>>> index f8f15332caa2..e7c91ee478d1 100644 >>>> --- a/arch/riscv/kernel/setup.c >>>> +++ b/arch/riscv/kernel/setup.c >>>> @@ -20,6 +20,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>>> >>>> #include >>>> #include >>>> @@ -228,10 +229,8 @@ static void __init parse_dtb(void) >>>> } >>>> >>>> pr_err("No DTB passed to the kernel\n"); >>>> -#ifdef CONFIG_CMDLINE_FORCE >>>> - strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); >>>> + cmdline_build(boot_command_line, NULL, COMMAND_LINE_SIZE); >>>> pr_info("Forcing kernel command line to: %s\n", boot_command_line); >>> >>> Shouldn't that message become conditional in some way? >>> >> >> You are right, I did something similar on ARM but looks like I missed it on RISCV. > > How is this hunk even useful? Under what conditions can you boot > without a DTB? Even with a built-in DTB, the DT cmdline handling would > be called. > Don't know, I wanted to keep as is today. Do you think the hunk should be completely removed ?