Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934904AbcLOCzw (ORCPT ); Wed, 14 Dec 2016 21:55:52 -0500 Received: from mail-db5eur01on0066.outbound.protection.outlook.com ([104.47.2.66]:7255 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752886AbcLOCzu (ORCPT ); Wed, 14 Dec 2016 21:55:50 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robin.Murphy@arm.com; Date: Thu, 15 Dec 2016 00:18:08 +0000 From: Robin Murphy To: Pali =?UTF-8?B?Um9ow6Fy?= CC: Russell King - ARM Linux , Arnd Bergmann , Linus Walleij , Ben Dooks , Tony Lindgren , Ivaylo Dimitrov , Sebastian Reichel , "Aaro Koskinen" , Pavel Machek , , Subject: Re: [PATCH] arm: dt: Initialize boot_command_line from CONFIG_CMDLINE in case DT does not provide /chosen/bootargs Message-ID: <20161215001808.66474937@m750.lan> In-Reply-To: <201612150109.20868@pali> References: <1481749963-8664-1-git-send-email-pali.rohar@gmail.com> <20161214235224.GH14217@n2100.armlinux.org.uk> <201612150109.20868@pali> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [217.45.102.228] X-ClientProxiedBy: DB6PR0601CA0041.eurprd06.prod.outlook.com (10.169.209.27) To DB6PR0802MB2343.eurprd08.prod.outlook.com (10.172.228.23) X-MS-Office365-Filtering-Correlation-Id: df090382-bfd3-4781-8d56-08d4247fdcd0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB6PR0802MB2343; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0802MB2343;3:nKfCOMK5b5txWpIeAAR5B8hr5uyNV2wG3KRFbLunA2jCGKIZEe489B/CMA1+oxs/yM1hG1ybQU4w9e9asFjVG40Thg0Kv7vs2v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ft-Exchange-Diagnostics: 1;DB6PR0802MB2343;31:/sSmgY4VzdSB9BSXm0fgrBlI9V9ZI5UOqVlvQqFMyXLhePCmEN4JomMzJ29Nu7AD4KTtxOanpLyXm7/zU3+htjz5NrJNdQ+B3Dormc1/j0vzN/MWHI2Cy+WJZ5pOYJco4dyDEPDFO+cj/GaJF97onJgR/561It0vAXrClWlh5AjYGN/uKwIdkszaBJ6d90nflNSYXTBRuu0zWFCcj9bZW4SqzgYFhYJEF4+iTg6jpr4wvsdvJp014UPTrDKZva1d8GEQvSwNwBFrK13eCC8hjg==;20:RtpzKMGHWPHQRDL1rpeYaMsUG6fEfIT7kbN7I0k0Bm6O0JZxrs3Tg510nmu4N6qGe6F5K65OHLh+mnVBZMNGHKbr39efg6bkRMgVOKFH8nv2aepwDWJW2fcEAh6XIgB8FKWq5BCgQZK8FFIwDCZdnbdxjonheVZ/ebztIQYHKYAJAdzdXzUc0hiTYLwKKwNUeEU6X3hkR+z0XOeiKONEI1HWUlZ5Mpc2hPGMmtwsAxFTecc+sJjluPy1ZqRitST15ygw12LRYu8y4uh8OCT1seGFwxy4AYH/cAOtOFMI8wd57+GXkhk8tSwlLnJGZ4WO1sYzqdzuhSceiA2wHIdvL1bxFDpOu8PyOYD2yps3MKvNHcTh46TYIwiUULbS/xfZLWV5GFqHlK/v6aSjGYZAew8zEOhs9gFdawOTAp0qB61O/7aUOMYnauBEK5SwMLzfE7zQceXnoXpKnOtIqdf4W15eO47EBScQtbUKxv57adwpLYi02fHckpLJEf/faZfI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148);SRVR:DB6PR0802MB2343;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2343; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0802MB2343;4:Y3o7fVAdXBRAGcYHjj+67mukUMpJjw8c/1mxGicfENekjSTZFXQw2PaQ8AEqAeSiDj64NFRdvz/V/BIDJXhQU6dTCf5vK/dIhyz5Keyw/OcaTrapljZYuQyFZJM8JXV8COqyCQma8ZRCNeT39B1m4W1bLgIX1j79e+1/kc4FGhrV6r/0PUCJb1MV0MXm+ALANt1hj+pioxs6o+npkViaFV1vjdyyHubbvb9hOaZgsIC7PnNMI1hMyIMCeGrcdfk52GqHuPKV9un2ZoDQTpHmuM8yfY5sH43wNDTrCkS8Aed0iy5eGj10qIGFHxCu6hlZqM4JlG+g+MTlfED/zVzws7XaKre2HtMGs9WI7fPLj0mhdKmjS/1m/NHInpztN9cX1GnT7NzSKEvvlm8D/m3zNDTkhOv2f5KurJVZpEdnhKhi2Rri7yhtUb9chSSCGkJ+HgkzWTtoj0Y5zgFS4SIskVGMneFQFqx7z9unbq/A1OqBnqqKutzV2WDcj+zTFAYEXAVyV+J67daQCiiAogaT1MbQCFWm/7ebAbgiwRJw/KsP3V4l8DmKzVHLBtEUhtL0ufqEMpN3zalKbwuYaZ3dwQ== X-Forefront-PRVS: 0157DEB61B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(39410400002)(39860400002)(39850400002)(39840400002)(39450400003)(189002)(199003)(40434004)(24454002)(50226002)(9686002)(3846002)(47776003)(50466002)(81156014)(81166006)(7736002)(69596002)(8746002)(8676002)(305945005)(70486001)(23676002)(6506006)(8266002)(97736004)(66066001)(7416002)(5660300001)(76176999)(38730400001)(4326007)(92566002)(21086003)(6916009)(229853002)(110136003)(86362001)(50986999)(189998001)(68736007)(42186005)(5820100001)(5890100001)(39060400001)(117636001)(36756003)(101416001)(2950100002)(1076002)(106356001)(105586002)(6116002)(6666003)(2906002)(25786008)(39210200001)(1970100001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2343;H:m750.lan;FPR:;SPF:None;PTR:InfoNoRecords;MX:1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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0802MB2343;7:iAoJw+nVq28q10zwApnih8RO1UWm+rXqmDNXUu/IO9LpRdr4jB3IUq9fBPejNYoPXzm0iO+AuvWdMt4YMXFM2DEhm67EaSSWsv2pT/f7HjlF/M3tPr3Oo9eilPw1wTiDXTrcza4CO438VQdusYv2oZHVq7pXHTYktrwV+STdcybdG/IdT4UaL/cLqBIXSQwmFpfgL2au6eBkICuWyDANCKKpMeAuBj8cVPTKOIOhznJa1G61pB7/M31O3BtLjoIP6LOq4BaUkPewOry1TtM8p96ULPgTZl28rCbJDMTUfWZDB8mAnSIhFRBqeYdVHrWby/naSTbko0Ohv0Yi9q3/JQeYUW8ShqR2cgJU6zokbD2DQePhSzfAxGOkmzq9qmlLl6FEEpMwthD3Ne90wAGXadLNnDHsCgJOBYo76Re8DSC6dKG6RwI0w4idydpXttAUpcwW9CczxZiHmeH7gggNSw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2016 00:18:14.4419 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2343 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBF2tvF7019752 Content-Length: 3618 Lines: 77 On Thu, 15 Dec 2016 01:09:20 +0100 Pali Rohár wrote: > On Thursday 15 December 2016 00:52:24 Russell King - ARM Linux wrote: > > On Wed, Dec 14, 2016 at 10:12:43PM +0100, Pali Rohár wrote: > > > Commit 008a2ebcd677 ("ARM: dts: omap3: Remove skeleton.dtsi > > > usage") broke support for setting cmdline on Nokia N900 via > > > CONFIG_CMDLINE. > > > > > > 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(). > > > > > > 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. > > > > This looks like a hack. > > > > First, the matter of the ATAGs compatibility. The decompressor > > relies on there being a pre-existing /chosen node to insert the > > command line and other parameters into. If we've dropped it (by > > dropping skeleton.dtsi) then we've just regressed more than just > > N900 - the decompressor won't be able to merge the ATAGs into the > > concatenated FDT. > > Hm... I did not think about it. But right this can be broken too... > > > Second, CONFIG_CMDLINE has never been in place on DT systems - it's > > something atags_parse.c has been dealing with which isn't involved > > on DT. For DT, we expect the command line to be passed in. > > If cmdline is not in DT, but /chosen exists, then function > early_init_dt_scan_chosen() use cmdline from CONFIG_CMDLINE. > > > Now, given that, I find your commit message rather fishy. You seem > > to be claiming that CONFIG_CMDLINE used to work, but the fact is, > > we've never had it working on device tree systems. > > Looks like that CONFIG_CMDLINE really did not worked (correctly) on > DT booted systems... We have already discussed about it on #armlinux > > > Instead, what I think was going on is that the bug you're seeing is > > that the removal of skeleton.dtsi results in the /chosen node being > > absent, which in turn prevents the decompressor picking the various > > parameters out of the ATAGs and dropping them into the DT blob. > > In my case, bootloader did not provided any cmdline in ATAG, so > decompressor did not parsed any cmdline... > > > That, to me, sounds like a regression, and the fix is not to hack > > support for an unrelated feature, but to fix the original problem - > > and I think in this case, it's reasonable to ask for the offending > > commit to be reverted. > > I will let decision to others, who created and accepted that patch > 008a2ebcd677. What I need is working CONFIG_CMDLINE as I had it > before as bootloader for Nokia N900 does not pass any cmdline -- and > without it I cannot boot userspace. Isn't that what CONFIG_CMDLINE_FORCE is for? Or you could, y'know, just add a chosen node to the N900 DT to put it back in the same state as before... Robin. > But still, I would like to see working CONFIG_CMDLINE support for DT > systems. Other systems (e.g. arm ATAG based or x86) have it. > > What is reason that CONFIG_CMDLINE is not supported for DT? > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.