{"id":1449487,"url":"http://patchwork.ozlabs.org/api/patches/1449487/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210309000247.2989531-7-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-7-danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20210309000247.2989531-7-danielwa@cisco.com/","date":"2021-03-09T00:02:42","name":"[v2,6/7] CMDLINE: mips: convert to generic builtin command line","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"c04eac941a97a412e1ea415169e494ad4f96b0a5","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-7-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/1449487/comments/","check":"fail","checks":"http://patchwork.ozlabs.org/api/patches/1449487/checks/","tags":{},"related":[{"id":1460186,"url":"http://patchwork.ozlabs.org/api/patches/1460186/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/ee6b727a83a936c521d7d746669726e22ab8b642.1617126961.git.danielwa@cisco.com/","msgid":"<ee6b727a83a936c521d7d746669726e22ab8b642.1617126961.git.danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/ee6b727a83a936c521d7d746669726e22ab8b642.1617126961.git.danielwa@cisco.com/","date":"2021-03-30T17:57:00","name":"[5/8] CMDLINE: mips: convert to generic builtin command line","mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/ee6b727a83a936c521d7d746669726e22ab8b642.1617126961.git.danielwa@cisco.com/mbox/"},{"id":1466835,"url":"http://patchwork.ozlabs.org/api/patches/1466835/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-5-danielwa@cisco.com/","msgid":"<20210416040924.2882771-5-danielwa@cisco.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20210416040924.2882771-5-danielwa@cisco.com/","date":"2021-04-16T04:09:15","name":"[4/8] CMDLINE: mips: convert to generic builtin command line","mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-5-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=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org;\n receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=X9xUKoNv;\n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=X9xUKoNv;\n\tdkim-atps=neutral","lists.ozlabs.org; spf=pass (sender SPF authorized)\n smtp.mailfrom=cisco.com (client-ip=173.37.142.90;\n helo=alln-iport-3.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=X9xUKoNv; dkim-atps=neutral"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\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 4Dvb8P0wggz9sW5\n\tfor <patchwork-incoming@ozlabs.org>; Tue,  9 Mar 2021 11:05:57 +1100 (AEDT)","from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4Dvb8N6z4bz3dqM\n\tfor <patchwork-incoming@ozlabs.org>; Tue,  9 Mar 2021 11:05:56 +1100 (AEDT)","from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90])\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 4Dvb543mXvz3cjr\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 alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA;\n 09 Mar 2021 00:03:00 +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 12902mKg014497;\n Tue, 9 Mar 2021 00:02:59 GMT"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=cisco.com; i=@cisco.com; l=6015; 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=8l0bK94TuqRd/jaDGX0hKXyHwTv+cw8NzkR9I9vUuIo=;\n b=X9xUKoNv4CzQ1wWapj6ZB189PGBp816HDso8aR1/5YWVDy1Uq/8S0qSw\n yCacVnarP56xUxUHBKDkzWYsYmE5AE9LftQ66gkz6+M6dTN+qWOCUZV/d\n e5TzIXNCcr5/SB+kF8Ql9ZbCHzXKFe2EScAwCTxW70UwG33MxcTB9O8ig 8=;","X-IronPort-AV":"E=Sophos;i=\"5.81,233,1610409600\"; d=\"scan'208\";a=\"658595592\"","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,\n Thomas Bogendoerfer <tsbogend@alpha.franken.de>","Subject":"[PATCH v2 6/7] CMDLINE: mips: convert to generic builtin command line","Date":"Mon,  8 Mar 2021 16:02:42 -0800","Message-Id":"<20210309000247.2989531-7-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":"Ruslan Ruslichenko <rruslich@cisco.com>,\n Ruslan Bilovol <rbilovol@cisco.com>, linux-kernel@vger.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 mips code to use the CONFIG_GENERIC_CMDLINE\noption.\n\nThis deletes the option for MIPS_CMDLINE_BUILTIN_EXTEND\nand replaces the functionality with generic code.\n\nCc: xe-linux-external@cisco.com\nSigned-off-by: Ruslan Ruslichenko <rruslich@cisco.com>\nSigned-off-by: Ruslan Bilovol <rbilovol@cisco.com>\nSigned-off-by: Daniel Walker <danielwa@cisco.com>\n---\n arch/mips/Kconfig        |  4 +---\n arch/mips/Kconfig.debug  | 44 ----------------------------------------\n arch/mips/kernel/setup.c | 36 ++++----------------------------\n 3 files changed, 5 insertions(+), 79 deletions(-)","diff":"diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig\nindex 0a17bedf4f0d..7c07b3bca9fc 100644\n--- a/arch/mips/Kconfig\n+++ b/arch/mips/Kconfig\n@@ -23,6 +23,7 @@ config MIPS\n \tselect CPU_NO_EFFICIENT_FFS if (TARGET_ISA_REV < 1)\n \tselect CPU_PM if CPU_IDLE\n \tselect GENERIC_ATOMIC64 if !64BIT\n+\tselect GENERIC_CMDLINE\n \tselect GENERIC_CMOS_UPDATE\n \tselect GENERIC_CPU_AUTOPROBE\n \tselect GENERIC_GETTIMEOFDAY\n@@ -3171,9 +3172,6 @@ choice\n \tconfig MIPS_CMDLINE_FROM_BOOTLOADER\n \t\tbool \"Bootloader kernel arguments if available\"\n \n-\tconfig MIPS_CMDLINE_BUILTIN_EXTEND\n-\t\tdepends on CMDLINE_BOOL\n-\t\tbool \"Extend builtin kernel arguments with bootloader arguments\"\n endchoice\n \n endmenu\ndiff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug\nindex 7a8d94cdd493..b5a099c74eb6 100644\n--- a/arch/mips/Kconfig.debug\n+++ b/arch/mips/Kconfig.debug\n@@ -30,50 +30,6 @@ config EARLY_PRINTK_8250\n config USE_GENERIC_EARLY_PRINTK_8250\n \tbool\n \n-config CMDLINE_BOOL\n-\tbool \"Built-in kernel command line\"\n-\thelp\n-\t  For most systems, it is firmware or second stage bootloader that\n-\t  by default specifies the kernel command line options.  However,\n-\t  it might be necessary or advantageous to either override the\n-\t  default kernel command line or add a few extra options to it.\n-\t  For such cases, this option allows you to hardcode your own\n-\t  command line options directly into the kernel.  For that, you\n-\t  should choose 'Y' here, and fill in the extra boot arguments\n-\t  in CONFIG_CMDLINE.\n-\n-\t  The built-in options will be concatenated to the default command\n-\t  line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default\n-\t  command line will be ignored and replaced by the built-in string.\n-\n-\t  Most MIPS systems will normally expect 'N' here and rely upon\n-\t  the command line from the firmware or the second-stage bootloader.\n-\n-config CMDLINE\n-\tstring \"Default kernel command string\"\n-\tdepends on CMDLINE_BOOL\n-\thelp\n-\t  On some platforms, there is currently no way for the boot loader to\n-\t  pass arguments to the kernel.  For these platforms, and for the cases\n-\t  when you want to add some extra options to the command line or ignore\n-\t  the default command line, you can supply some command-line options at\n-\t  build time by entering them here.  In other cases you can specify\n-\t  kernel args so that you don't have to set them up in board prom\n-\t  initialization routines.\n-\n-\t  For more information, see the CMDLINE_BOOL and CMDLINE_OVERRIDE\n-\t  options.\n-\n-config CMDLINE_OVERRIDE\n-\tbool \"Built-in command line overrides firmware arguments\"\n-\tdepends on CMDLINE_BOOL\n-\thelp\n-\t  By setting this option to 'Y' you will have your kernel ignore\n-\t  command line arguments from firmware or second stage bootloader.\n-\t  Instead, the built-in command line will be used exclusively.\n-\n-\t  Normally, you will choose 'N' here.\n-\n config SB1XXX_CORELIS\n \tbool \"Corelis Debugger\"\n \tdepends on SIBYTE_SB1xxx_SOC\ndiff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c\nindex 7e1f8e277437..8ce763e03792 100644\n--- a/arch/mips/kernel/setup.c\n+++ b/arch/mips/kernel/setup.c\n@@ -23,6 +23,7 @@\n #include <linux/debugfs.h>\n #include <linux/kexec.h>\n #include <linux/sizes.h>\n+#include <linux/cmdline.h>\n #include <linux/device.h>\n #include <linux/dma-map-ops.h>\n #include <linux/decompress/generic.h>\n@@ -67,12 +68,6 @@ EXPORT_SYMBOL(mips_machtype);\n static char __initdata command_line[COMMAND_LINE_SIZE];\n char __initdata arcs_cmdline[COMMAND_LINE_SIZE];\n \n-#ifdef CONFIG_CMDLINE_BOOL\n-static const char builtin_cmdline[] __initconst = CONFIG_CMDLINE;\n-#else\n-static const char builtin_cmdline[] __initconst = \"\";\n-#endif\n-\n /*\n  * mips_io_port_base is the begin of the address space to which x86 style\n  * I/O ports are mapped.\n@@ -546,27 +541,7 @@ static void __init bootcmdline_init(void)\n {\n \tbool dt_bootargs = false;\n \n-\t/*\n-\t * If CMDLINE_OVERRIDE is enabled then initializing the command line is\n-\t * trivial - we simply use the built-in command line unconditionally &\n-\t * unmodified.\n-\t */\n-\tif (IS_ENABLED(CONFIG_CMDLINE_OVERRIDE)) {\n-\t\tstrlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);\n-\t\treturn;\n-\t}\n-\n-\t/*\n-\t * If the user specified a built-in command line &\n-\t * MIPS_CMDLINE_BUILTIN_EXTEND, then the built-in command line is\n-\t * prepended to arguments from the bootloader or DT so we'll copy them\n-\t * to the start of boot_command_line here. Otherwise, empty\n-\t * boot_command_line to undo anything early_init_dt_scan_chosen() did.\n-\t */\n-\tif (IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))\n-\t\tstrlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);\n-\telse\n-\t\tboot_command_line[0] = 0;\n+\tboot_command_line[0] = 0;\n \n #ifdef CONFIG_OF_EARLY_FLATTREE\n \t/*\n@@ -589,12 +564,9 @@ static void __init bootcmdline_init(void)\n \t\tbootcmdline_append(arcs_cmdline, COMMAND_LINE_SIZE);\n \n \t/*\n-\t * If the user specified a built-in command line & we didn't already\n-\t * prepend it, we append it to boot_command_line here.\n+\t * Use the generic system for builtin prepend and append.\n \t */\n-\tif (IS_ENABLED(CONFIG_CMDLINE_BOOL) &&\n-\t    !IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))\n-\t\tbootcmdline_append(builtin_cmdline, COMMAND_LINE_SIZE);\n+\tcmdline_add_builtin(boot_command_line, NULL, COMMAND_LINE_SIZE);\n }\n \n /*\n","prefixes":["v2","6/7"]}