From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [RESEND PATCH v3 3/3] sh: add the sh_ prefix to early platform symbols Date: Tue, 23 Oct 2018 13:18:23 +0100 Message-ID: <861s8gua9c.wl-marc.zyngier@arm.com> References: <20180827090651.25062-1-brgl@bgdev.pl> <20180827090651.25062-4-brgl@bgdev.pl> <8636swude1.wl-marc.zyngier@arm.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Geert Uytterhoeven Cc: Mark Rutland , Rich Felker , Michael Turquette , Sekhar Nori , Frank Rowand , Linux-Arch , Yoshinori Sato , Kevin Hilman , Bartosz Golaszewski , "Rafael J. Wysocki" , Magnus Damm , Bartosz Golaszewski , Andy Shevchenko , Jiri Slaby , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , David Lechner , Arnd Bergmann , Johan Hovold , Rob Herring , Thomas Gleixner , Linux ARM , Daniel List-Id: devicetree@vger.kernel.org Hi Geert, On Tue, 23 Oct 2018 12:32:16 +0100, Geert Uytterhoeven wrote: > > Hi Marc, > > On Tue, Oct 23, 2018 at 1:11 PM Marc Zyngier wrote: > > On Mon, 27 Aug 2018 10:06:51 +0100, > > Bartosz Golaszewski wrote: > > As for the whole "early device" debate, my take is that we'd be much > > better off making the device model available early, rather than trying > > to architect something that is simply papering over the issue. > > The device model itself can be made available earlier, but the big > blocker is mainly the use of everything related to the scheduler > (threads, msleep()), which depends on the "early" timer. I agree this is an annoying dependency, as I've myself been down that particular rabbit hole... ;-) > I think it can be made to work if msleep() and all thread-related > functions would return -EPROBE_DEFER, but that should be handled in > every single driver, which may be already the case for > thread-related functions, but not for e.g. msleep(), which currently > returns void. That would be massively invasive... One way of solving this would be to make the device model available early, but then preserve the ordering required by other subsystems such as the scheduler: interrupts, timers and clocks have to be available first, as they are basically at the root of all dependencies. This is a different kind of "early" though, as having the device model early means all its functionalities are available early, and that includes being able to allocate DMA buffers, which some interrupt controllers require. The current proposal doesn't help with DMA, and still leaves these devices in a state where drivers have to reinvent their own square wheel. Thanks, M. -- Jazz is not dead, it just smell funny. From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Tue, 23 Oct 2018 13:18:23 +0100 Subject: [RESEND PATCH v3 3/3] sh: add the sh_ prefix to early platform symbols In-Reply-To: References: <20180827090651.25062-1-brgl@bgdev.pl> <20180827090651.25062-4-brgl@bgdev.pl> <8636swude1.wl-marc.zyngier@arm.com> Message-ID: <861s8gua9c.wl-marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Geert, On Tue, 23 Oct 2018 12:32:16 +0100, Geert Uytterhoeven wrote: > > Hi Marc, > > On Tue, Oct 23, 2018 at 1:11 PM Marc Zyngier wrote: > > On Mon, 27 Aug 2018 10:06:51 +0100, > > Bartosz Golaszewski wrote: > > As for the whole "early device" debate, my take is that we'd be much > > better off making the device model available early, rather than trying > > to architect something that is simply papering over the issue. > > The device model itself can be made available earlier, but the big > blocker is mainly the use of everything related to the scheduler > (threads, msleep()), which depends on the "early" timer. I agree this is an annoying dependency, as I've myself been down that particular rabbit hole... ;-) > I think it can be made to work if msleep() and all thread-related > functions would return -EPROBE_DEFER, but that should be handled in > every single driver, which may be already the case for > thread-related functions, but not for e.g. msleep(), which currently > returns void. That would be massively invasive... One way of solving this would be to make the device model available early, but then preserve the ordering required by other subsystems such as the scheduler: interrupts, timers and clocks have to be available first, as they are basically at the root of all dependencies. This is a different kind of "early" though, as having the device model early means all its functionalities are available early, and that includes being able to allocate DMA buffers, which some interrupt controllers require. The current proposal doesn't help with DMA, and still leaves these devices in a state where drivers have to reinvent their own square wheel. Thanks, M. -- Jazz is not dead, it just smell funny.