Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933579AbbDPIFK (ORCPT ); Thu, 16 Apr 2015 04:05:10 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:65046 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756625AbbDPIEo (ORCPT ); Thu, 16 Apr 2015 04:04:44 -0400 From: Arnd Bergmann To: Florian Fainelli Cc: p.zabel@pengutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tyler.baker@linaro.org, peter.griffin@linaro.org, dinguyen@opensource.altera.com Subject: Re: Allowing reset controllers before SMP initialization (on ARM)? Date: Thu, 16 Apr 2015 10:04:39 +0200 Message-ID: <2592960.UsK4Hr7GSl@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <552F0786.2000505@gmail.com> References: <552F0786.2000505@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:xcpFJXeYepXf3ns0VGt/7RmzKGmPp1qd6hctUsQlTTYh5XcOtZt BbLE7CH9Oh/CeGHzj4YA2nGXELF2lya4In1SYTFOHGyOl+FU2opvKF4+G6VYUyJlwFQ5zcM 88be6NW3C1yOrkkxGHtVTtBqg5cvyw8FTiinvIXYkGcPxelLEYAa6Ac8JJKtYCdgs674AWd wgabneiGFsm3Vd7Ofguww== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2161 Lines: 49 On Wednesday 15 April 2015 17:51:18 Florian Fainelli wrote: > Hi, > > In order to support initialization of the secondary core on BCM63138 > SoCs, I would want to utilize a reset controller to release the > secondary CPU from reset [1]. > > Here are multiple options: > > - expose a custom function which registers the reset controller platform > driver as early as possible, which is probably acceptable, but also > requires the DT machine descriptor to populate the platform bus earlier, > which we could completely avoid I think populating the platform bus earlier is not realistic, that would break lots of existing dependencies. In particular, we can't do it much earlier because it has to be done after the platform bus itself is instantiated. > - have a OF_DECLARE_RESET_CONTROLLER() which is running fairly early > during boot, such that we can utilize reset controllers are early as > possible, before any initcall level, and before SMP initialization is > kicking in We've added a couple of those, and it could be done here, but putting them in the right order is a bit tricky, and I think we can avoid it. > - since the code that boots secondary CPUs is relatively unique, even > within the scope of the reset controllers (sequence involves touching > multiple registers), pulling it outside of the reset controller might be > acceptable (there is still some level of sharing though for low-level > indirect read/write operations) Yes, it's a hack, but the SMP code is rather special and a lot of other platforms do similar hacks already. What I'd like to see happen in the long run is more along the lines of: - Avoid dependencies on the early SMP code, and just set up the data structures for possible CPUs early, which can be done without any hardware interaction. Then move the actual CPU enable path much later in the boot process, possibly combined with the cpuidle driver. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/