{"id":1461752,"url":"http://patchwork.ozlabs.org/api/covers/1461752/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1617375802.git.christophe.leroy@csgroup.eu/","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":"<cover.1617375802.git.christophe.leroy@csgroup.eu>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/cover.1617375802.git.christophe.leroy@csgroup.eu/","date":"2021-04-02T15:18:01","name":"[v4,00/20] Implement GENERIC_CMDLINE","submitter":{"id":79086,"url":"http://patchwork.ozlabs.org/api/people/79086/?format=json","name":"Christophe Leroy","email":"christophe.leroy@csgroup.eu"},"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/cover/cover.1617375802.git.christophe.leroy@csgroup.eu/mbox/","series":[{"id":237158,"url":"http://patchwork.ozlabs.org/api/series/237158/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=237158","date":"2021-04-02T15:18:03","name":"Implement GENERIC_CMDLINE","version":4,"mbox":"http://patchwork.ozlabs.org/series/237158/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/1461752/comments/","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>)","lists.ozlabs.org; spf=pass (sender SPF authorized)\n smtp.mailfrom=csgroup.eu (client-ip=93.17.236.30; helo=pegase1.c-s.fr;\n envelope-from=christophe.leroy@csgroup.eu; receiver=<UNKNOWN>)"],"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 4FBkGb1kBGz9t19\n\tfor <patchwork-incoming@ozlabs.org>; Sat,  3 Apr 2021 02:18:46 +1100 (AEDT)","from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4FBkGZ5vbjz3cCW\n\tfor <patchwork-incoming@ozlabs.org>; Sat,  3 Apr 2021 02:18:46 +1100 (AEDT)","from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by lists.ozlabs.org (Postfix) with ESMTPS id 4FBkFt6W4dz3bql\n for <linuxppc-dev@lists.ozlabs.org>; Sat,  3 Apr 2021 02:18:07 +1100 (AEDT)","from localhost (mailhub1-int [192.168.12.234])\n by localhost (Postfix) with ESMTP id 4FBkFh5XNLz9v2lv;\n Fri,  2 Apr 2021 17:18:00 +0200 (CEST)","from pegase1.c-s.fr ([192.168.12.234])\n by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024)\n with ESMTP id MktCNdTeHFtr; Fri,  2 Apr 2021 17:18:00 +0200 (CEST)","from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192])\n by pegase1.c-s.fr (Postfix) with ESMTP id 4FBkFh4M9Fz9v2ls;\n Fri,  2 Apr 2021 17:18:00 +0200 (CEST)","from localhost (localhost [127.0.0.1])\n by messagerie.si.c-s.fr (Postfix) with ESMTP id 4E5858BB79;\n Fri,  2 Apr 2021 17:18:02 +0200 (CEST)","from messagerie.si.c-s.fr ([127.0.0.1])\n by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023)\n with ESMTP id TLVHNmtRjBbO; Fri,  2 Apr 2021 17:18:02 +0200 (CEST)","from po16121vm.idsi0.si.c-s.fr (unknown [192.168.4.90])\n by messagerie.si.c-s.fr (Postfix) with ESMTP id 9B1828BB7B;\n Fri,  2 Apr 2021 17:18:01 +0200 (CEST)","by po16121vm.idsi0.si.c-s.fr (Postfix, from userid 0)\n id 600FB67989; Fri,  2 Apr 2021 15:18:01 +0000 (UTC)"],"X-Virus-Scanned":["Debian amavisd-new at c-s.fr","amavisd-new at c-s.fr"],"Message-Id":"<cover.1617375802.git.christophe.leroy@csgroup.eu>","From":"Christophe Leroy <christophe.leroy@csgroup.eu>","Subject":"[PATCH v4 00/20] Implement GENERIC_CMDLINE","To":"will@kernel.org, danielwa@cisco.com, robh@kernel.org,\n daniel@gimpelevich.san-francisco.ca.us, arnd@kernel.org,\n akpm@linux-foundation.org","Date":"Fri,  2 Apr 2021 15:18:01 +0000 (UTC)","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-arch@vger.kernel.org, devicetree@vger.kernel.org,\n microblaze <monstr@monstr.eu>, linux-xtensa@linux-xtensa.org,\n linux-sh@vger.kernel.org, linux-hexagon@vger.kernel.org, x86@kernel.org,\n linux-kernel@vger.kernel.org, nios2 <ley.foon.tan@intel.com>,\n linux-mips@vger.kernel.org, linux-mm@kvack.org,\n openrisc@lists.librecores.org,\n sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org,\n linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.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":"The purpose of this series is to improve and enhance the\nhandling of kernel boot arguments.\n\nCurrent situation is that most if not all architectures are using\nsimilar options to do some manupulation on command line arguments:\n- Prepend built-in arguments in front of bootloader provided arguments\n- Append built-in arguments after bootloader provided arguments\n- Replace bootloader provided arguments by built-in arguments\n- Use built-in arguments when none is provided by bootloader.\n\nOn some architectures, all the options are possible. On other ones,\nonly a subset are available.\n\nThe purpose of this series is to refactor and enhance the\nhandling of kernel boot arguments so that every architecture can\nbenefit from all possibilities.\n\nIt is first focussed on powerpc but also extends the capability\nfor other arches.\n\nThe work has been focussed on minimising the churn in architectures\nby keeping the most commonly used namings.\n\nMain changes in V4:\n- Included patch from Daniel to replace powerpc's strcpy() by strlcpy()\n- Using strlcpy() instead of zeroing first char + strlcat() (idea taken frm Daniel's series)\n- Reworked the convertion of EFI which was wrong in V3\n- Added \"too long\" command line handling\n- Changed cmdline macro into a function\n- Done a few fixes in arch (NIOS2, SH, ARM)\n- Taken comments into account (see individual responses for details)\n- Tested on powerpc, build tested on ARM64, X86_64.\n\nMain changes in V3:\n- Also accept destination equal to source in cmdline_build() by setting a tmp buffer in __initdata. Powerpc provides different source and destination and call __cmdline_build() directly.\n- Taken comments received from Will and Rob\n- Converted all architectures (Only tested on powerpc)\n\nChristophe Leroy (19):\n  cmdline: Add generic function to build command line.\n  drivers: of: use cmdline building function\n  x86/efi: Replace CONFIG_CMDLINE_OVERRIDE by CONFIG_CMDLINE_FORCE\n  drivers: firmware: efi: use cmdline building function\n  cmdline: Gives architectures opportunity to use generically defined\n    boot cmdline manipulation\n  powerpc: Convert to GENERIC_CMDLINE\n  arm: Convert to GENERIC_CMDLINE\n  arm64: Convert to GENERIC_CMDLINE\n  hexagon: Convert to GENERIC_CMDLINE\n  microblaze: Convert to GENERIC_CMDLINE\n  nios2: Convert to GENERIC_CMDLINE\n  openrisc: Convert to GENERIC_CMDLINE\n  riscv: Convert to GENERIC_CMDLINE\n  sh: Convert to GENERIC_CMDLINE\n  sparc: Convert to GENERIC_CMDLINE\n  xtensa: Convert to GENERIC_CMDLINE\n  x86: Convert to GENERIC_CMDLINE\n  mips: Convert to GENERIC_CMDLINE\n  cmdline: Remove CONFIG_CMDLINE_EXTEND\n\nDaniel Walker (1):\n  powerpc: convert strcpy to strlcpy in prom_init\n\n arch/arm/Kconfig                              | 38 +--------\n arch/arm/kernel/atags_parse.c                 | 13 +--\n arch/arm64/Kconfig                            | 33 +-------\n arch/arm64/kernel/idreg-override.c            |  9 +--\n arch/hexagon/Kconfig                          | 11 +--\n arch/hexagon/kernel/setup.c                   | 10 +--\n arch/microblaze/Kconfig                       | 24 +-----\n arch/microblaze/configs/mmu_defconfig         |  2 +-\n arch/microblaze/kernel/head.S                 |  4 +-\n arch/mips/Kconfig                             |  1 +\n arch/mips/Kconfig.debug                       | 44 -----------\n arch/mips/configs/ar7_defconfig               |  1 -\n arch/mips/configs/bcm47xx_defconfig           |  1 -\n arch/mips/configs/bcm63xx_defconfig           |  1 -\n arch/mips/configs/bmips_be_defconfig          |  1 -\n arch/mips/configs/bmips_stb_defconfig         |  1 -\n arch/mips/configs/capcella_defconfig          |  1 -\n arch/mips/configs/ci20_defconfig              |  1 -\n arch/mips/configs/cu1000-neo_defconfig        |  1 -\n arch/mips/configs/cu1830-neo_defconfig        |  1 -\n arch/mips/configs/e55_defconfig               |  1 -\n arch/mips/configs/generic_defconfig           |  1 -\n arch/mips/configs/gpr_defconfig               |  1 -\n arch/mips/configs/loongson3_defconfig         |  1 -\n arch/mips/configs/mpc30x_defconfig            |  1 -\n arch/mips/configs/rt305x_defconfig            |  1 -\n arch/mips/configs/tb0219_defconfig            |  1 -\n arch/mips/configs/tb0226_defconfig            |  1 -\n arch/mips/configs/tb0287_defconfig            |  1 -\n arch/mips/configs/workpad_defconfig           |  1 -\n arch/mips/configs/xway_defconfig              |  1 -\n arch/mips/kernel/relocate.c                   |  4 +-\n arch/mips/kernel/setup.c                      | 40 +---------\n arch/mips/pic32/pic32mzda/early_console.c     |  2 +-\n arch/mips/pic32/pic32mzda/init.c              |  2 -\n arch/nios2/Kconfig                            | 25 +-----\n arch/nios2/kernel/setup.c                     | 13 +--\n arch/openrisc/Kconfig                         | 10 +--\n arch/powerpc/Kconfig                          | 37 +--------\n arch/powerpc/kernel/prom_init.c               | 46 ++++++-----\n arch/riscv/Kconfig                            | 44 +----------\n arch/riscv/kernel/setup.c                     |  7 +-\n arch/sh/Kconfig                               | 28 +------\n arch/sh/configs/ap325rxa_defconfig            |  2 +-\n arch/sh/configs/dreamcast_defconfig           |  2 +-\n arch/sh/configs/ecovec24-romimage_defconfig   |  2 +-\n arch/sh/configs/ecovec24_defconfig            |  2 +-\n arch/sh/configs/edosk7760_defconfig           |  2 +-\n arch/sh/configs/espt_defconfig                |  2 +-\n arch/sh/configs/j2_defconfig                  |  2 +-\n arch/sh/configs/kfr2r09-romimage_defconfig    |  2 +-\n arch/sh/configs/kfr2r09_defconfig             |  2 +-\n arch/sh/configs/lboxre2_defconfig             |  2 +-\n arch/sh/configs/microdev_defconfig            |  2 +-\n arch/sh/configs/migor_defconfig               |  2 +-\n arch/sh/configs/polaris_defconfig             |  2 +-\n arch/sh/configs/r7780mp_defconfig             |  2 +-\n arch/sh/configs/r7785rp_defconfig             |  2 +-\n arch/sh/configs/rsk7201_defconfig             |  2 +-\n arch/sh/configs/rsk7203_defconfig             |  2 +-\n arch/sh/configs/rts7751r2d1_defconfig         |  2 +-\n arch/sh/configs/rts7751r2dplus_defconfig      |  2 +-\n arch/sh/configs/sdk7780_defconfig             |  2 +-\n arch/sh/configs/sdk7786_defconfig             |  2 +-\n arch/sh/configs/se7206_defconfig              |  2 +-\n arch/sh/configs/se7343_defconfig              |  2 +-\n arch/sh/configs/se7712_defconfig              |  2 +-\n arch/sh/configs/se7721_defconfig              |  2 +-\n arch/sh/configs/se7724_defconfig              |  2 +-\n arch/sh/configs/se7751_defconfig              |  2 +-\n arch/sh/configs/se7780_defconfig              |  2 +-\n arch/sh/configs/sh03_defconfig                |  2 +-\n arch/sh/configs/sh2007_defconfig              |  2 +-\n arch/sh/configs/sh7757lcr_defconfig           |  2 +-\n arch/sh/configs/sh7763rdp_defconfig           |  2 +-\n arch/sh/configs/shmin_defconfig               |  2 +-\n arch/sh/configs/shx3_defconfig                |  2 +-\n arch/sh/configs/titan_defconfig               |  2 +-\n arch/sh/configs/ul2_defconfig                 |  2 +-\n arch/sh/kernel/setup.c                        | 11 +--\n arch/sparc/Kconfig                            | 18 +----\n arch/sparc/prom/bootstr_64.c                  |  2 +-\n arch/x86/Kconfig                              | 45 +----------\n arch/x86/kernel/setup.c                       | 17 +---\n arch/xtensa/Kconfig                           | 15 +---\n arch/xtensa/configs/audio_kc705_defconfig     |  1 -\n arch/xtensa/configs/common_defconfig          |  1 -\n arch/xtensa/configs/generic_kc705_defconfig   |  1 -\n arch/xtensa/configs/iss_defconfig             |  1 -\n arch/xtensa/configs/nommu_kc705_defconfig     |  1 -\n arch/xtensa/configs/smp_lx200_defconfig       |  1 -\n arch/xtensa/configs/virt_defconfig            |  1 -\n arch/xtensa/configs/xip_kc705_defconfig       |  1 -\n arch/xtensa/kernel/setup.c                    | 10 +--\n .../firmware/efi/libstub/efi-stub-helper.c    | 35 ++++----\n drivers/firmware/efi/libstub/efi-stub.c       | 23 ++----\n drivers/firmware/efi/libstub/efistub.h        |  2 +-\n drivers/firmware/efi/libstub/x86-stub.c       | 18 +----\n drivers/of/fdt.c                              | 23 +-----\n include/linux/cmdline.h                       | 79 +++++++++++++++++++\n init/Kconfig                                  | 46 +++++++++++\n usr/Kconfig                                   |  2 +-\n 102 files changed, 265 insertions(+), 628 deletions(-)\n create mode 100644 include/linux/cmdline.h"}