Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756576AbcLNVdn (ORCPT ); Wed, 14 Dec 2016 16:33:43 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55946 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbcLNVdm (ORCPT ); Wed, 14 Dec 2016 16:33:42 -0500 Date: Wed, 14 Dec 2016 22:25:56 +0100 From: Pavel Machek To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Russell King , Arnd Bergmann , Robin Murphy , Linus Walleij , Ben Dooks , Tony Lindgren , Ivaylo Dimitrov , Sebastian Reichel , Aaro Koskinen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm: dt: Initialize boot_command_line from CONFIG_CMDLINE in case DT does not provide /chosen/bootargs Message-ID: <20161214212556.GC28424@amd> References: <1481749963-8664-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E/DnYTRukya0zdZ1" Content-Disposition: inline In-Reply-To: <1481749963-8664-1-git-send-email-pali.rohar@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1831 Lines: 57 --E/DnYTRukya0zdZ1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2016-12-14 22:12:43, Pali Roh=E1r wrote: > Commit 008a2ebcd677 ("ARM: dts: omap3: Remove skeleton.dtsi usage") broke > support for setting cmdline on Nokia N900 via CONFIG_CMDLINE. >=20 > It is because arm code booted in DT mode parse cmdline only via function > early_init_dt_scan_chosen() and that function does not fill variable > boot_command_line when DTB does not contain /chosen entry. It is called > from function early_init_dt_scan_nodes() in setup_machine_fdt(). >=20 > This patch fixes it by explicitly filling boot_command_line in function > setup_machine_fdt() after calling early_init_dt_scan_nodes() in case > boot_command_line still remains empty. >=20 > Signed-off-by: Pali Roh=E1r Acked-by: Pavel Machek > --- a/arch/arm/kernel/devtree.c > +++ b/arch/arm/kernel/devtree.c > @@ -260,6 +260,11 @@ const struct machine_desc * __init setup_machine_fdt= (unsigned int dt_phys) > =20 > early_init_dt_scan_nodes(); > =20 > +#ifdef CONFIG_CMDLINE > + if (!boot_command_line[0]) > + strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); > +#endif > + > /* Change machine number to match the mdesc we're using */ > __machine_arch_type =3D mdesc->nr; > =20 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --E/DnYTRukya0zdZ1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlhRuOQACgkQMOfwapXb+vL02QCgkZn4flgu4+zqxi3dtZpbnnrv q7EAnjP4oZZpNAWyzZTRDlmUreRClAHq =u4Gn -----END PGP SIGNATURE----- --E/DnYTRukya0zdZ1--