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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 2F766C433E3 for ; Fri, 26 Mar 2021 15:27:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E179A61A27 for ; Fri, 26 Mar 2021 15:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbhCZP1H (ORCPT ); Fri, 26 Mar 2021 11:27:07 -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-Google-Smtp-Source: ABdhPJwqjia+Et0ifS4Qa3YP7BG89nAuXW50XJw7Bv12OLaUbiQxEkJ38eyAu5ZhN7DqGhRVJR72+O39P4k/LsEHPLw= 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-sh@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