Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1375953pxf; Fri, 26 Mar 2021 06:50:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuxl1yTDX2SIcCvWOjCbLtElorg8nQoPLmj/Q6Qx4t5YsSzUuKEU/T/uGHaRMOAYGln+QU X-Received: by 2002:a05:6402:b41:: with SMTP id bx1mr15383239edb.69.1616766635172; Fri, 26 Mar 2021 06:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616766635; cv=none; d=google.com; s=arc-20160816; b=wLX3p5lYoKpl4AXZPjLT+k/LzYXqLg09sURZ/y5B/6WvqfONYU8eTzrzpNxNjoY6a0 /Z6jnDmPLSJIIQ/T8Wo20ZCvy55Q7DIf7rQdBYFhtdgA9FdgU0/gqTO9+19EK0x+M0Hv drcKIG0YWhCaQmpejcnkBcCrqfFfgGTpWEV+pxO1uUYaiU6CV9MyjtBz1FicT637+imV hVSO/ReQNBJfiskTIKXKBX5+jLez9EpPsV+s1agRBRFC5GW44Q6kUUdQFOOmqsxHZV6z sPC9vY72192OU+p2mmaqorMslPBcFjs2i8nzhvqxlXR1L5rLnldkybY1msZIUw5MWPQ2 VUtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:references:in-reply-to :message-id; bh=P93FkrF6Hr0mP2UgMLVDByq45lk/hUm+IS+29NMx3E0=; b=LICjZIMlt4tyeJf6hBN6ar3fDKt8ZSKD89ht9k/3AWksY4MJOfa+NkXF1bVVmF+9kV mqi8occTLfIsiDMK7cw+W8dRKdX7gdIajKFxadmWLzfG9r2j1KgoHW/RZyTOyx0PFDjJ IOyN6FK5HdYYvZC7V/dFYR3VHgUrUQ+WyKWTaUj1adO24yfYs7Bf5FahPfo8I6kiKqRT RJV2ilEIEzjRUBDI8hfBvR1JCvd2MFghpggLNQtKGyNZ23X1bvaBD60q4qNM5NYYNo6q uAZqae1MqzluZyGmFKD5k4WPTd54tX9MdKbUJobhoO9aq9f6t7ogl8KCKcJcjlOh4SE0 lsgQ== 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 p9si6582840edq.59.2021.03.26.06.50.12; Fri, 26 Mar 2021 06:50:35 -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 S230432AbhCZNrt (ORCPT + 99 others); Fri, 26 Mar 2021 09:47:49 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:30423 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230221AbhCZNpa (ORCPT ); Fri, 26 Mar 2021 09:45:30 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4F6NWY5C3mz9v03L; Fri, 26 Mar 2021 14:44:57 +0100 (CET) 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 4mW1M94fWAEi; Fri, 26 Mar 2021 14:44:57 +0100 (CET) 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 4F6NWY4Gn8z9v03B; Fri, 26 Mar 2021 14:44:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6E7728B8C7; Fri, 26 Mar 2021 14:44:58 +0100 (CET) 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 lzygznqtzRZ7; Fri, 26 Mar 2021 14:44:58 +0100 (CET) Received: from po16121vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1C1488B8C9; Fri, 26 Mar 2021 14:44:58 +0100 (CET) Received: by po16121vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 9B96867611; Fri, 26 Mar 2021 13:44:58 +0000 (UTC) Message-Id: <46745e07b04139a22b5bd01dc37df97e6981e643.1616765870.git.christophe.leroy@csgroup.eu> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE To: will@kernel.org, danielwa@cisco.com, robh@kernel.org, daniel@gimpelevich.san-francisco.ca.us Cc: linux-arch@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.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 Date: Fri, 26 Mar 2021 13:44:58 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/riscv/Kconfig | 44 +-------------------------------------- arch/riscv/kernel/setup.c | 5 ++--- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 87d7b52f278f..3dbd50bed037 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -39,6 +39,7 @@ config RISCV select EDAC_SUPPORT select GENERIC_ARCH_TOPOLOGY if SMP select GENERIC_ATOMIC64 if !64BIT + select GENERIC_CMDLINE select GENERIC_EARLY_IOREMAP select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO select GENERIC_IOREMAP @@ -390,49 +391,6 @@ endmenu menu "Boot options" -config CMDLINE - string "Built-in kernel command line" - help - For most platforms, the arguments for the kernel's command line - are provided at run-time, during boot. However, there are cases - where either no arguments are being provided or the provided - arguments are insufficient or even invalid. - - When that occurs, it is possible to define a built-in command - line here and choose how the kernel should use it later on. - -choice - prompt "Built-in command line usage" if CMDLINE != "" - default CMDLINE_FALLBACK - help - Choose how the kernel will handle the provided built-in command - line. - -config CMDLINE_FALLBACK - bool "Use bootloader kernel arguments if available" - help - Use the built-in command line as fallback in case we get nothing - during boot. This is the default behaviour. - -config CMDLINE_EXTEND - bool "Extend bootloader kernel arguments" - help - The command-line arguments provided during boot will be - appended to the built-in command line. This is useful in - cases where the provided arguments are insufficient and - you don't want to or cannot modify them. - - -config CMDLINE_FORCE - bool "Always use the default kernel command string" - help - Always use the built-in command line, even if we get one during - boot. This is useful in case you need to override the provided - command line on systems where you don't have or want control - over it. - -endchoice - config EFI_STUB bool 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); -#endif } void __init setup_arch(char **cmdline_p) -- 2.25.0