Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1358496pxf; Fri, 2 Apr 2021 08:22:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylv3nlm/LpjbOqts/4rot/nNHckmlP5kAj/9dItyCoAzjxzU56D8rcup/dWU3qoHhZJPu6 X-Received: by 2002:a17:906:a413:: with SMTP id l19mr14587080ejz.421.1617376955820; Fri, 02 Apr 2021 08:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617376955; cv=none; d=google.com; s=arc-20160816; b=PTQ7UG8mXXzfprSMT9cmszTiJEBoI1ou8ueCOvj6ogTam2OBC5srjcgoEiEttfRr2a K2c+hvOnAYKtnhH5bMQNN624M3R1LAmaBngtjAkxhvN53ty/yt4MYGn4j0MNgK3oBQXr mD2zYB8mRBIKkfArXqx5NtPZch7iEoglAfUNP8KrZ5Wah/E2SH2gpb6QVkNw91x2F2z2 fL4RnTrnzTuLOawOzwW9wrYMaHfyEJkgfE+EoQw4I+CtF0a56YDsU5QjtfFR/Aa4CpF3 22avbNbZNU8gKJ9HJErdXydibSIcgIvV/cHoNTLs+9Qq8rdxKKKTnX8bGgAR06qs5Yys lnuQ== 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=Mck7fmirENKJzB1yxz+VWvRcLG5kJmO5T89OtL4/qbg=; b=jDMlbRbooYS6e4CsWN1bWiCAp2MBKu9eLlz7wgFgno6UDNliekLgDlcmiADmml4a1S UHqbvOujy9aD9+2IFBRib2FIOxIEEq7wUzmxXerd4IHGilTCuoJ362rmw0s5XU6qyh8E DZaiiVjeyoznjV32xVk8e7K7wOTjDRS8CWCckILQbGTSKKO7EneCcVkYcE5sCsgmuk1b Tce+DYRCl/6WjHrMYeMvSHU5b5VHN0nsr4+WQ3k7d8a3/3UMjRunWPr82e36CLIA3Gaz A0y1hWDV3cD0A2EdL6EY6oimuezW4T+2fFmE484/a2QLmnq3xFLISDY/VUK26yD0W8aw 1lVg== 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 kk22si6559499ejc.98.2021.04.02.08.22.12; Fri, 02 Apr 2021 08:22: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 S236330AbhDBPTP (ORCPT + 99 others); Fri, 2 Apr 2021 11:19:15 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:19422 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235477AbhDBPSQ (ORCPT ); Fri, 2 Apr 2021 11:18:16 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4FBkFt0gKkz9v2lt; Fri, 2 Apr 2021 17:18:10 +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 G_aS3o--dyaE; Fri, 2 Apr 2021 17:18:10 +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 4FBkFs6ZBKz9v2ls; Fri, 2 Apr 2021 17:18:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AFD2D8BB7B; Fri, 2 Apr 2021 17:18:11 +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 Pkw9Ff5U_wk1; Fri, 2 Apr 2021 17:18:11 +0200 (CEST) Received: from po16121vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DCD6A8BB79; Fri, 2 Apr 2021 17:18:10 +0200 (CEST) Received: by po16121vm.idsi0.si.c-s.fr (Postfix, from userid 0) id B36F067989; Fri, 2 Apr 2021 15:18:10 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v4 09/20] arm64: Convert to GENERIC_CMDLINE To: will@kernel.org, danielwa@cisco.com, robh@kernel.org, daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org, akpm@linux-foundation.org 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, linux-mm@kvack.org Date: Fri, 2 Apr 2021 15:18:10 +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/arm64/Kconfig | 33 +----------------------------- arch/arm64/kernel/idreg-override.c | 9 ++++---- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e4e1b6550115..9781ba3758b1 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -105,6 +105,7 @@ config ARM64 select GENERIC_ALLOCATOR select GENERIC_ARCH_TOPOLOGY select GENERIC_CLOCKEVENTS_BROADCAST + select GENERIC_CMDLINE select GENERIC_CPU_AUTOPROBE select GENERIC_CPU_VULNERABILITIES select GENERIC_EARLY_IOREMAP @@ -1841,38 +1842,6 @@ config ARM64_ACPI_PARKING_PROTOCOL protocol even if the corresponding data is present in the ACPI MADT table. -config CMDLINE - string "Default kernel command string" - default "" - help - Provide a set of default command-line options at build time by - entering them here. As a minimum, you should specify the the - root device (e.g. root=/dev/nfs). - -choice - prompt "Kernel command line type" if CMDLINE != "" - default CMDLINE_FROM_BOOTLOADER - help - Choose how the kernel will handle the provided default kernel - command line string. - -config CMDLINE_FROM_BOOTLOADER - bool "Use bootloader kernel arguments if available" - help - Uses the command-line options passed by the boot loader. If - the boot loader doesn't provide any, the default kernel command - string provided in CMDLINE will be used. - -config CMDLINE_FORCE - bool "Always use the default kernel command string" - help - Always use the default kernel command string, even if the boot - loader passes other arguments to the kernel. - This is useful if you cannot or don't want to change the - command-line options your boot loader passes to the kernel. - -endchoice - config EFI_STUB bool diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c index 83f1c4b92095..96a4e96a80a2 100644 --- a/arch/arm64/kernel/idreg-override.c +++ b/arch/arm64/kernel/idreg-override.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -187,12 +188,10 @@ static __init const u8 *get_bootargs_cmdline(void) static __init void parse_cmdline(void) { const u8 *prop = get_bootargs_cmdline(); + static char __initdata cmdline[COMMAND_LINE_SIZE]; - if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop) - __parse_cmdline(CONFIG_CMDLINE, true); - - if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop) - __parse_cmdline(prop, true); + cmdline_build(cmdline, prop); + __parse_cmdline(cmdline, true); } /* Keep checkers quiet */ -- 2.25.0