Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1642663pxf; Fri, 26 Mar 2021 11:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf0nE5WgTpRLMUS7gfcEVxu9du7aAjdfy3QpkkLlpxZkG8QnKkHrchV4FAhLSPhBq9zjuu X-Received: by 2002:a05:6402:1d1a:: with SMTP id dg26mr16501930edb.266.1616783025729; Fri, 26 Mar 2021 11:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616783025; cv=none; d=google.com; s=arc-20160816; b=tguxRMAV/KXeFAdseNbg2L6tXkt24lu3Z2qfZKVOQMKuOG3eaiJpABPR1bYZW93pHx YXMrTXrwDMbRojwElk4KUMydffQVZiAIUTqBWr7kQxYU8ghCqlWcxrCoJpF6Las7T+Z/ 3tjYLyTKDDb0cRp4QQPrpxHIPEFvFHJlYeX8+pRTkclz1jPEWNU8Ri2l/U+h00/bNvU3 zCUzRYTq7hH+UWIBDq78qUpLnwMZL/edCmzleGs+UaY9NUvpzG/+rS9i0QnWommHfYey c2cFZhbbn6SW5IMscqMrrF1UPfxBSaPuSYrfI1SMn0LD2Hk3j5dq2Ly2zh8JkX1tUUoy NoNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kyxZEnAq8545tl25CzMMB3IgekYFIHHN9JFEDImki+o=; b=G4/FRAkiF1s9lOkS6xsf2ADNgms69WjSHkJKgGGyxVNZQqTqpn4n5aqjlUmN0o9mhT Fk/J6dlVf7AkMXSCVaJyuLappvbnusAUcZrETYIB4uAYVo8t5F5iWBorW+/gyT8B4e1n ZLh6jU+0X2phgU515W6MeQs+X8kRIpTFlg5Zx77i2axMiTppxf0OofTRoSjeh3mLMqp2 w9JS4CuFlHoom9cnMAZLmoEj1YuZJqcc4vbkG2bYj9qnID1vyaKvOP6veH+m5gx1Iwtz udEgJ6kNDuFrZctJSpBvAoA3fd/+h3vleEvwppFjCPzIfCMDbSBgaf70jvx9iLL4Lbz7 o5Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FGNMBA2S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be2si7590512edb.153.2021.03.26.11.23.23; Fri, 26 Mar 2021 11:23:45 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FGNMBA2S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbhCZSW2 (ORCPT + 99 others); Fri, 26 Mar 2021 14:22:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:33874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbhCZSWT (ORCPT ); Fri, 26 Mar 2021 14:22:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E74AC61A42; Fri, 26 Mar 2021 18:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616782938; bh=jLGR+NyehSUNZVl5kh+mHpluJzlAfSJXFMkJ5QFHPLQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FGNMBA2S+sqoHCfdgN2xPFLdvY7w1ubfGycnYplAm5Xuh33eTfteivyAovekbWA9w yfld9bMxHjPtk6Hhklpu7oYZIbdFL1ljaGBXqC5JDt9yKBlTX7kAx1myFZ7wuAQTTU jVdlWWeH+3FguNaGmIau3X7NuPSKeRLNaH0udlAHqHLaTI2Nh59I0ILOAppKs8o8/D 19qHEC4fCaQI1gejM6rW9sLEbEJ8sx1EuiN8eQS9UBjNdK2v5TM+H9geJCe0fg2Uua hTXju+20flSq1dpCUtji3RjvYCP8L0pwpr+4Ldr1Bi1ZJpawqdb9WedZVTTF9eqZAI +O7oIbfohruuw== Received: by mail-ed1-f43.google.com with SMTP id z1so7357057edb.8; Fri, 26 Mar 2021 11:22:17 -0700 (PDT) X-Gm-Message-State: AOAM531NN1LxYZLJOxCneNWdSgtk6d+MKHDjSzrgTmSVmvn9CQTFQ7W7 qmCMJiyxN2fCYXZ7HmhCfaumQr7mc30XpZJJ6Q== X-Received: by 2002:a05:6402:c0f:: with SMTP id co15mr16452718edb.373.1616782936426; Fri, 26 Mar 2021 11:22:16 -0700 (PDT) MIME-Version: 1.0 References: <7362e4f6a5f5b79e6ad3fd3cec3183a4a283f7fc.1616765870.git.christophe.leroy@csgroup.eu> In-Reply-To: From: Rob Herring Date: Fri, 26 Mar 2021 12:22:04 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 05/17] arm: Convert to GENERIC_CMDLINE To: Christophe Leroy , Nicolas Pitre Cc: Will Deacon , Daniel Walker , Daniel Gimpelevich , "open list:GENERIC INCLUDE/ASM HEADER FILES" , devicetree@vger.kernel.org, linuxppc-dev , "linux-kernel@vger.kernel.org" , linux-arm-kernel , microblaze , "open list:MIPS" , nios2 , Openrisc , linux-hexagon@vger.kernel.org, linux-riscv , X86 ML , linux-xtensa@linux-xtensa.org, SH-Linux , sparclinux Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Nico who added the line in question. On Fri, Mar 26, 2021 at 9:50 AM Christophe Leroy wrote: > > > > Le 26/03/2021 =C3=A0 16:47, Rob Herring a =C3=A9crit : > > On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy > > wrote: > >> > >> This converts the architecture to GENERIC_CMDLINE. > >> > >> Signed-off-by: Christophe Leroy > >> --- > >> arch/arm/Kconfig | 38 +--------------------------------= -- > >> arch/arm/kernel/atags_parse.c | 15 +++++--------- > >> 2 files changed, 6 insertions(+), 47 deletions(-) > >> > >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > >> index 5da96f5df48f..67bc75f2da81 100644 > >> --- a/arch/arm/Kconfig > >> +++ b/arch/arm/Kconfig > >> @@ -50,6 +50,7 @@ config ARM > >> select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY > >> select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K ||= !AEABI > >> select GENERIC_CLOCKEVENTS_BROADCAST if SMP > >> + select GENERIC_CMDLINE if ATAGS > > > > Don't we need this enabled for !ATAGS (i.e. DT boot)? > > > > Can we always enable GENERIC_CMDLINE for OF_EARLY_FLATTREE? > > > > Don't know. > > Today ARM has: > > choice > prompt "Kernel command line type" if CMDLINE !=3D "" > default CMDLINE_FROM_BOOTLOADER > depends on ATAGS I think that's a mistake. In a DT only case (no ATAGS), we'll get different behaviour (in fdt.c) depending if CONFIG_ATAGS is enabled or not. Note that at the time (2012) the above was added, the DT code only supported CONFIG_CMDLINE and CONFIG_CMDLINE_FORCE. CONFIG_CMDLINE_EXTEND was only added in 2016. And that has different behavior for ATAGS vs. DT. In summary, it's a mess. We should drop the depends either before this patch or just as part of this patch IMO. I'd go with the latter given CONFIG_ATAGS is default y and enabled for common configs. Without that, it looks like CONFIG_CMDLINE disappears from menuconfig for at91_dt_defconfig. Also, I think this code should be refactored a bit to eliminate default_command_line. Instead, we should just save a pointer to the ATAGS command line string, and then call cmdline_build here instead of doing the extra copy: /* parse_early_param needs a boot_command_line */ strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); Rob