{"id":1449488,"url":"http://patchwork.ozlabs.org/api/patches/1449488/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210309000247.2989531-8-danielwa@cisco.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20210309000247.2989531-8-danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20210309000247.2989531-8-danielwa@cisco.com/","date":"2021-03-09T00:02:43","name":"[v2,7/7] CMDLINE: x86: convert to generic builtin command line","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"4d615193624a2c4dba5b611e6c6929f48a99d18f","submitter":{"id":67374,"url":"http://patchwork.ozlabs.org/api/people/67374/?format=json","name":"Daniel Walker (danielwa)","email":"danielwa@cisco.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210309000247.2989531-8-danielwa@cisco.com/mbox/","series":[{"id":232859,"url":"http://patchwork.ozlabs.org/api/series/232859/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=232859","date":"2021-03-09T00:02:37","name":"[v2,1/7] CMDLINE: add generic builtin command line","version":2,"mbox":"http://patchwork.ozlabs.org/series/232859/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/1449488/comments/","check":"fail","checks":"http://patchwork.ozlabs.org/api/patches/1449488/checks/","tags":{},"related":[{"id":1460188,"url":"http://patchwork.ozlabs.org/api/patches/1460188/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/19776ce76932e1957faa21250f303481db39fb32.1617126961.git.danielwa@cisco.com/","msgid":"<19776ce76932e1957faa21250f303481db39fb32.1617126961.git.danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/19776ce76932e1957faa21250f303481db39fb32.1617126961.git.danielwa@cisco.com/","date":"2021-03-30T17:57:02","name":"[7/8] CMDLINE: x86: convert to generic builtin command line","mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/19776ce76932e1957faa21250f303481db39fb32.1617126961.git.danielwa@cisco.com/mbox/"},{"id":1466839,"url":"http://patchwork.ozlabs.org/api/patches/1466839/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-7-danielwa@cisco.com/","msgid":"<20210416040924.2882771-7-danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20210416040924.2882771-7-danielwa@cisco.com/","date":"2021-04-16T04:09:17","name":"[6/8] CMDLINE: x86: convert to generic builtin command line","mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-7-danielwa@cisco.com/mbox/"}],"headers":{"Return-Path":"\n <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Authentication-Results":["ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org;\n receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=elKPczeg;\n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=elKPczeg;\n\tdkim-atps=neutral","lists.ozlabs.org; spf=pass (sender SPF authorized)\n smtp.mailfrom=cisco.com (client-ip=173.37.86.75; helo=rcdn-iport-4.cisco.com;\n envelope-from=danielwa@cisco.com; receiver=<UNKNOWN>)","lists.ozlabs.org; dkim=pass (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=elKPczeg; dkim-atps=neutral"],"Received":["from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4Dvb8s6456z9s1l\n\tfor <patchwork-incoming@ozlabs.org>; Tue,  9 Mar 2021 11:06:21 +1100 (AEDT)","from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4Dvb8s5MXjz3dNx\n\tfor <patchwork-incoming@ozlabs.org>; Tue,  9 Mar 2021 11:06:21 +1100 (AEDT)","from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n bits)) (No client certificate requested)\n by lists.ozlabs.org (Postfix) with ESMTPS id 4Dvb545BXFz3cbm\n for <linuxppc-dev@lists.ozlabs.org>; Tue,  9 Mar 2021 11:03:04 +1100 (AEDT)","from alln-core-2.cisco.com ([173.36.13.135])\n by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA;\n 09 Mar 2021 00:03:03 +0000","from zorba.cisco.com ([10.24.7.91])\n by alln-core-2.cisco.com (8.15.2/8.15.2) with ESMTP id 12902mKh014497;\n Tue, 9 Mar 2021 00:03:01 GMT"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=cisco.com; i=@cisco.com; l=4760; q=dns/txt; s=iport;\n t=1615248184; x=1616457784;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=tQ2KjkNmJ1N6aeJwFCAC+GVVOXowsaBAtY9t5Zi/wUA=;\n b=elKPczegsaLZ0KcR3gPiBg3AfqD7OPxyrbxm+v7qO4/+ml/rJXugBEY0\n 0j3dM3MMs+Z20JSKsNalhd7MCN3VCWpNIgQHezdg4RAit/6f6TievDhQN\n q7ZGJyp7H/7A3MgvbF1/q8ka38egtk6bSvL9jkLm+AtGw4XIXu/H6A0q9 k=;","X-IronPort-Anti-Spam-Filtered":"true","X-IronPort-Anti-Spam-Result":"\n A0BIAwAiukZg/4cNJK1iHAEBAQEBAQcBARIBAQQEAQGCD4IrgUwBOTGWG4opkicLAQEBDzQEAQGETYF8AiU4EwIDAQELAQEFAQEBAgEGBHGFboZ9ATgOgQI8ARKCcIJWAy+sJIIoiBsNYoFFFIEliFx0hBgcgUlCgRGDWIIaiBkEgkYBdRkBCiUBgVSBG5AlBgSCbYozgR2aCluDCIEflVuFHQ8io2yUXY5HlA6BayOBVzMaCBsVgyRQGQ2OKxaNagFcIAMvOAIGCgEBAwmPJgEB","X-IronPort-AV":"E=Sophos;i=\"5.81,233,1610409600\"; d=\"scan'208\";a=\"846417833\"","From":"Daniel Walker <danielwa@cisco.com>","To":"Will Deacon <will@kernel.org>,\n Christophe Leroy <christophe.leroy@csgroup.eu>,\n Rob Herring <robh@kernel.org>,\n Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,\n Andrew Morton <akpm@linux-foundation.org>, x86@kernel.org,\n linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n xe-linux-external@cisco.com, Thomas Gleixner <tglx@linutronix.de>,\n Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,\n \"H. Peter Anvin\" <hpa@zytor.com>","Subject":"[PATCH v2 7/7] CMDLINE: x86: convert to generic builtin command line","Date":"Mon,  8 Mar 2021 16:02:43 -0800","Message-Id":"<20210309000247.2989531-8-danielwa@cisco.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Auto-Response-Suppress":"DR, OOF, AutoReply","X-Outbound-SMTP-Client":"10.24.7.91, [10.24.7.91]","X-Outbound-Node":"alln-core-2.cisco.com","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linux-kernel@vger.kernel.org, Ruslan Ruslichenko <rruslich@cisco.com>,\n linux-efi@vger.kernel.org, Ruslan Bilovol <ruslan.bilovol@gmail.com>,\n Ard Biesheuvel <ardb@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"This updates the x86 code to use the CONFIG_GENERIC_CMDLINE\noption.\n\nCc: xe-linux-external@cisco.com\nSigned-off-by: Ruslan Ruslichenko <rruslich@cisco.com>\nSigned-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>\nSigned-off-by: Daniel Walker <danielwa@cisco.com>\n---\n arch/x86/Kconfig                        | 44 +------------------------\n arch/x86/kernel/setup.c                 | 18 ++--------\n drivers/firmware/efi/libstub/x86-stub.c |  2 +-\n 3 files changed, 4 insertions(+), 60 deletions(-)","diff":"diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig\nindex 21f851179ff0..3950f9bf9855 100644\n--- a/arch/x86/Kconfig\n+++ b/arch/x86/Kconfig\n@@ -115,6 +115,7 @@ config X86\n \tselect EDAC_SUPPORT\n \tselect GENERIC_CLOCKEVENTS_BROADCAST\tif X86_64 || (X86_32 && X86_LOCAL_APIC)\n \tselect GENERIC_CLOCKEVENTS_MIN_ADJUST\n+\tselect GENERIC_CMDLINE\n \tselect GENERIC_CMOS_UPDATE\n \tselect GENERIC_CPU_AUTOPROBE\n \tselect GENERIC_CPU_VULNERABILITIES\n@@ -2368,49 +2369,6 @@ choice\n \n endchoice\n \n-config CMDLINE_BOOL\n-\tbool \"Built-in kernel command line\"\n-\thelp\n-\t  Allow for specifying boot arguments to the kernel at\n-\t  build time.  On some systems (e.g. embedded ones), it is\n-\t  necessary or convenient to provide some or all of the\n-\t  kernel boot arguments with the kernel itself (that is,\n-\t  to not rely on the boot loader to provide them.)\n-\n-\t  To compile command line arguments into the kernel,\n-\t  set this option to 'Y', then fill in the\n-\t  boot arguments in CONFIG_CMDLINE.\n-\n-\t  Systems with fully functional boot loaders (i.e. non-embedded)\n-\t  should leave this option set to 'N'.\n-\n-config CMDLINE\n-\tstring \"Built-in kernel command string\"\n-\tdepends on CMDLINE_BOOL\n-\tdefault \"\"\n-\thelp\n-\t  Enter arguments here that should be compiled into the kernel\n-\t  image and used at boot time.  If the boot loader provides a\n-\t  command line at boot time, it is appended to this string to\n-\t  form the full kernel command line, when the system boots.\n-\n-\t  However, you can use the CONFIG_CMDLINE_OVERRIDE option to\n-\t  change this behavior.\n-\n-\t  In most cases, the command line (whether built-in or provided\n-\t  by the boot loader) should specify the device for the root\n-\t  file system.\n-\n-config CMDLINE_OVERRIDE\n-\tbool \"Built-in command line overrides boot loader arguments\"\n-\tdepends on CMDLINE_BOOL && CMDLINE != \"\"\n-\thelp\n-\t  Set this option to 'Y' to have the kernel ignore the boot loader\n-\t  command line, and use ONLY the built-in command line.\n-\n-\t  This is used to work around broken boot loaders.  This should\n-\t  be set to 'N' under normal conditions.\n-\n config MODIFY_LDT_SYSCALL\n \tbool \"Enable the LDT (local descriptor table)\" if EXPERT\n \tdefault y\ndiff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c\nindex 740f3bdb3f61..e748c3e5c1ae 100644\n--- a/arch/x86/kernel/setup.c\n+++ b/arch/x86/kernel/setup.c\n@@ -48,6 +48,7 @@\n #include <asm/unwind.h>\n #include <asm/vsyscall.h>\n #include <linux/vmalloc.h>\n+#include <linux/cmdline.h>\n \n /*\n  * max_low_pfn_mapped: highest directly mapped pfn < 4 GB\n@@ -162,9 +163,6 @@ unsigned long saved_video_mode;\n #define RAMDISK_LOAD_FLAG\t\t0x4000\n \n static char __initdata command_line[COMMAND_LINE_SIZE];\n-#ifdef CONFIG_CMDLINE_BOOL\n-static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;\n-#endif\n \n #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)\n struct edd edd;\n@@ -884,19 +882,7 @@ void __init setup_arch(char **cmdline_p)\n \tbss_resource.start = __pa_symbol(__bss_start);\n \tbss_resource.end = __pa_symbol(__bss_stop)-1;\n \n-#ifdef CONFIG_CMDLINE_BOOL\n-#ifdef CONFIG_CMDLINE_OVERRIDE\n-\tstrlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);\n-#else\n-\tif (builtin_cmdline[0]) {\n-\t\t/* append boot loader cmdline to builtin */\n-\t\tstrlcat(builtin_cmdline, \" \", COMMAND_LINE_SIZE);\n-\t\tstrlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);\n-\t\tstrlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);\n-\t}\n-#endif\n-#endif\n-\n+\tcmdline_add_builtin(boot_command_line, NULL, COMMAND_LINE_SIZE);\n \tstrlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);\n \t*cmdline_p = command_line;\n \ndiff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c\nindex f14c4ff5839f..9538c9d4a0bc 100644\n--- a/drivers/firmware/efi/libstub/x86-stub.c\n+++ b/drivers/firmware/efi/libstub/x86-stub.c\n@@ -736,7 +736,7 @@ unsigned long efi_main(efi_handle_t handle,\n \t}\n \n #ifdef CONFIG_CMDLINE_BOOL\n-\tstatus = efi_parse_options(CONFIG_CMDLINE);\n+\tstatus = efi_parse_options(CONFIG_CMDLINE_PREPEND \" \" CONFIG_CMDLINE_APPEND);\n \tif (status != EFI_SUCCESS) {\n \t\tefi_err(\"Failed to parse options\\n\");\n \t\tgoto fail;\n","prefixes":["v2","7/7"]}