Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1483417pxf; Fri, 26 Mar 2021 08:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyinWv4jzzstmmpWWw02YZKszXW7rzpzpVnY/D519x8NEUhUN9QZk0yyICK/PxTik3WAty+ X-Received: by 2002:aa7:c4cc:: with SMTP id p12mr15430430edr.325.1616772633324; Fri, 26 Mar 2021 08:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616772633; cv=none; d=google.com; s=arc-20160816; b=hVIc7FHc3Zd9kgIHtP7xQw9oE1kL/w92kcLErxkoncrN88k3f+qRWIGLEkErx+YA2Y /6qt9w5TgS8+syWufkhX9BMLX127xL3ra/QcKOF/bhpoG/IdIhA0FSbsiIxdnBq8eAui KxrOwj4BKJtiyPPBuF8JLnnHJ371kUJqqmKwsPmmKWaurB7StvHdcUon5Ux3OnOhvIFc OeMFgm9/9AsEcBilYD/VVXZTN3LnuRjDQZmwpV4e/JuZ9euim86uQYqQaFVn8fyjJVtt o+hJADJBSWLzm/sHnsiTmu8WWaj+tbgcDXVnCuF/gSceDQv4Gj2sWZhDaUT1S29TsFmQ a6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ux8uavn5VQ/xJmB/MjkPhX2GGyFsPJtsAcDUvicMAiU=; b=nf5UGNBvSdtjfQ4yZWhrCOXbd7ias8bT1EFtPGvSDZlSwYEmVMUiVNwuQOKkMlkWKt r2EtOexwGhhySN6FpSEh53BNfZSpFRcCEJs2t4tWPLyoYRvu3Ws5jynwigv5gokr6sEa BP0ZJsBzHVfZdnr5+xX+GPpY9i+N07FekMHp5aWP/P8ox3KyOk+a3Q6zSDwjJDpgKXJo 5RF3v5WCBlGslDoqNfE+I+nTfc9lkGX3lB+GfqXAsdwspNuhT2iHeX6z4J77rzHJzSDE /khiCw06AsCdirfD2HzmpcDTrXQOuRxGI7GV1NGhkhuvZD9zHlk4kZFg5mMSYuXM1QTw reAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Eg+BwZGA; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si6857624ejr.284.2021.03.26.08.30.10; Fri, 26 Mar 2021 08:30:33 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Eg+BwZGA; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbhCZP1G (ORCPT + 99 others); Fri, 26 Mar 2021 11:27:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbhCZP1C (ORCPT ); Fri, 26 Mar 2021 11:27:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD59E61A36; Fri, 26 Mar 2021 15:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616772421; bh=PgZvub/EEgXyOMtj36/Ui5nnRJqFFaiQoQ/VbltMCjA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Eg+BwZGAwSyILfvPcAOTVne302pKV2q+cmm5Ihp4Me5aUHSjUNGW3+nDtB8R91wcm C2DZ9VNhmbn0jETV9GNehbOwe3JTYKhoqjnh/MiS11ee4oxdvW0wRf2ZrWgUDyfJma hWNpN/TDOWiJIBIfJozhEVq7FS6Mk6XBvB49orLZFW6uYQR5hUuZGCCK5sAk8SD5SC UeP3y50GhNpSvcc4yWyh8y4La1rfFodfJDuofdgE1ai4ujHIVkZF7oQxbAyMF7RCJU u626vT1IL6nOSZEgmRmqhiGrDEBDKZfd4AiSGwBgBRCvns974kHSj2o73ajFlbU9P5 x5eyEjjSzm5/A== Received: by mail-ed1-f42.google.com with SMTP id bf3so6760125edb.6; Fri, 26 Mar 2021 08:27:01 -0700 (PDT) X-Gm-Message-State: AOAM5314zhfTHmpNPiZvla7UF3/Hs8EnVkg1oA4GXjTiAG8dOURW35N+ ZUZGDbPp5z87wTpP5TtBFmSnG5H7B8Og419Mtw== X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr16004050edd.258.1616772420155; Fri, 26 Mar 2021 08:27:00 -0700 (PDT) MIME-Version: 1.0 References: <46745e07b04139a22b5bd01dc37df97e6981e643.1616765870.git.christophe.leroy@csgroup.eu> <87zgyqdn3d.fsf@igel.home> <81a7e63f-57d4-5c81-acc5-35278fe5bb04@csgroup.eu> In-Reply-To: <81a7e63f-57d4-5c81-acc5-35278fe5bb04@csgroup.eu> From: Rob Herring Date: Fri, 26 Mar 2021 09:26:47 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE To: Christophe Leroy 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy wrote: > > > > Le 26/03/2021 =C3=A0 15:08, Andreas Schwab a =C3=A9crit : > > On M=C3=A4r 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. Rob