From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751984AbbK1M17 (ORCPT ); Sat, 28 Nov 2015 07:27:59 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:52535 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbbK1M15 (ORCPT ); Sat, 28 Nov 2015 07:27:57 -0500 From: Arnd Bergmann To: Nicolas Pitre Cc: linux-arm-kernel@lists.infradead.org, Russell King - ARM Linux , Pali =?ISO-8859-1?Q?Roh=E1r?= , "devicetree@vger.kernel.org" , Ivaylo Dimitrov , Laura Abbott , Tony Lindgren , Sebastian Reichel , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , Pavel Machek , Grant Likely , linux-omap@vger.kernel.org, Frank Rowand , Andreas =?ISO-8859-1?Q?F=E4rber?= Subject: Re: [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Date: Sat, 28 Nov 2015 13:27:07 +0100 Message-ID: <2565382.eR6yg1spIk@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <20150713131902.GH26485@atomide.com> <11537945.4HX4Y84tjV@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:qhyx724IpTOUB6M9h8fVzxIMmj+NBA7a81ZdW1LoABhjY9F7vt3 wBbL0reIuP/jacFMv7dr9vRQLmSwhm0fOxrW2L7hzi22tsNtZTQFoTYMTjjjTLe1M6Zzbty 2AbSQuyFYDngf1HXKMTdt9CakxzmjkdNCF3hpuzLlk+S2eFC/aB7yMznNfjgqVFfrHWgQtU q88Dcyu199+uH5u8dRabg== X-UI-Out-Filterresults: notjunk:1;V01:K0:OVRS+aEqPPw=:2oGmgfK8U5tKNz9mWVIIey DqyXSoPy4OeCJPB7BMIhaiC38c2bmKUlWrOZXGe6NMvuDOFFUXqA8vZQ8b2NiAuxSMr20SjYP BZauGxmAHjWyoMqwgVj46RW0+iC0wH8CjjcIhI1cpE6TAfnQ2OhQlsyPGt8+gc49Gl0QkDwMA ugYgFYjJoNray4y5Cf8TgtBYWpk2qXf0R2lZebu8e2JG4hEgMUD0oQ8b2QHHO2wEuR6ZqRp/u mWOlrXMw4SwvACfHqQeft1GgBvrK8FcqII9dfOwwRCy0DN1oz4PenZbYIyIRa0m/QVAkw0M5C Y1u2DjpSyL7HDSRIGzDvj9hQZ/9U3ez1r7oM7w+utpImeeQXIht5sZSyJp3c5YDa400NogWxF m0cNG9/PdHhMBTFQCALGKxMZfINJdV2htM2oywNQGO26x0SZquKC6XjwYERNQ38S/13FlGiIq Yp5GQ5y9VWYfFmgSvzlDq2UV+x+LDrRJcPXp6TaN5pC2ELRAHt2lBFlj8/+atsRILfbMfNg+n QywlHNRnV082zQ3p1laHZ8roWGGMkC8Pgvuoe0NXdVuAyuyhPUzYNKW7kv8Q31oEY4zAL/JIr eh17ENyMcG60CKlL+nfpoGM/JogoIuKorKWtTDb9/4i6txgvniquK7TQgrqaB6LWWtZ1EPUMS mvg2q4V8v8IKlHd4PmkzoiJb9sl+Hp5KNdJjiOe8pbfIACHh7St/gaJoJMwTQUz+OloTWB5Mq tTukPLWIz9fK/G7v Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 27 November 2015 18:28:50 Nicolas Pitre wrote: > On Fri, 27 Nov 2015, Arnd Bergmann wrote: > > > I don't mind creating the /proc/atags compatibility hack from the kernel > > for a DT based N700 kernel, as long as we limit it as much as we can > > to the machines that need it. Leaving a board file for the N700 in place > > that contains the procfs code (and not much more) seems reasonable > > here, as we are talking about a board specific hack and the whole point > > appears to be running unmodified user space. > > > > Regarding how to get the data into the kernel in the first place, my > > preferred choice would still be to have an intermediate bootloader > > such as pxa-impedance-matcher, but I won't complain if others are > > happy enough about putting it into the ATAGS compat code we already > > have, as long as it's limited to the boards we know need it. > > Assuming you have a N700 board file for special procfs code, then why > not getting at the atags in memory where the bootloader has put them > directly from that same board file? This way it'll really be limited to > the board we know needs it and the special exception will be contained > to that one file. Amongst the machine specific hooks, there is one that > gets invoked early during boot before those atags are overwritten. I didn't realize this was possible, as we don't know the atags pointer when we instead get a DTB pointer. However you are right: the board file knows exactly that the atag_offset is 0x100, so we can grab it from there, and that will make the implementation really easy and contained to a single file that has access to the atags and that can create the /proc/atags file for it. Arnd