From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbcIBS0P (ORCPT ); Fri, 2 Sep 2016 14:26:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:60811 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172AbcIBS0N (ORCPT ); Fri, 2 Sep 2016 14:26:13 -0400 Date: Fri, 2 Sep 2016 20:26:06 +0200 From: "Luis R. Rodriguez" To: Gabriel Paubert Cc: mcgrof@kernel.org, ming.lei@canonical.com, akpm@linux-foundation.org, gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com, linux-doc@vger.kernel.org, Gilles.Muller@lip6.fr, tiwai@suse.de, Daniel Vetter , Alessandro Rubini , stephen.boyd@linaro.org, bjorn.andersson@linaro.org, teg@jklm.no, chunkeey@googlemail.com, cocci@systeme.lip6.fr, jwboyer@fedoraproject.org, Jonathan Corbet , Kevin Cernekee , Thierry Martinez , linux-serial@vger.kernel.org, jslaby@suse.com, zohar@linux.vnet.ibm.com, arend.vanspriel@broadcom.com, linuxppc-dev@lists.ozlabs.org, Kees Cook , hauke@hauke-m.de, nicolas.palix@imag.fr, Abhay_Salunke@dell.com, Julia.Lawall@lip6.fr, broonie@kernel.org, j.anaszewski@samsung.com, kvalo@codeaurora.org, dhowells@redhat.com, dwmw2@infradead.org, markivx@codeaurora.org, daniel.wagner@bmw-carit.de, linux-kernel@vger.kernel.org, luto@amacapital.net, mmarek@suse.com, rpurdie@rpsys.net, johannes@sipsolutions.net, fengguang.wu@intel.com, torvalds@linux-foundation.org Subject: Re: [PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe Message-ID: <20160902182606.GN3296@wotan.suse.de> References: <1466117661-22075-1-git-send-email-mcgrof@kernel.org> <1471999507-913-1-git-send-email-mcgrof@kernel.org> <1471999507-913-3-git-send-email-mcgrof@kernel.org> <20160824081738.GA8991@visitor2.iram.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160824081738.GA8991@visitor2.iram.es> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 10:17:38AM +0200, Gabriel Paubert wrote: > On Tue, Aug 23, 2016 at 05:45:04PM -0700, mcgrof@kernel.org wrote: > > [snip] > > --- > > Documentation/firmware_class/README | 20 ++++ > > drivers/base/Kconfig | 2 +- > > .../request_firmware-avoid-init-probe-init.cocci | 130 +++++++++++++++++++++ > > 3 files changed, 151 insertions(+), 1 deletion(-) > > create mode 100644 scripts/coccinelle/api/request_firmware-avoid-init-probe-init.cocci > > > > diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README > > index cafdca8b3b15..056d1cb9d365 100644 > > --- a/Documentation/firmware_class/README > > +++ b/Documentation/firmware_class/README > > @@ -93,6 +93,26 @@ > > user contexts to request firmware asynchronously, but can't be called > > in atomic contexts. > > > > +Requirements: > > +============= > > + > > +You should avoid at all costs requesting firmware on both init and probe paths > > +of your device driver. Reason for this is the complexity needed to ensure a > > +firmware will be available for a driver early in boot through different > > +build configurations. Consider built-in drivers needing firmware early, or > > +consider a driver assuming it will only get firmware after pivot_root(). > > + > > +Drivers that really need firmware early should use stuff the firmware in > > Minor grammatical nit: s/use// Fixed, thanks. Luis From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: Re: [PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe Date: Fri, 2 Sep 2016 20:26:06 +0200 Message-ID: <20160902182606.GN3296@wotan.suse.de> References: <1466117661-22075-1-git-send-email-mcgrof@kernel.org> <1471999507-913-1-git-send-email-mcgrof@kernel.org> <1471999507-913-3-git-send-email-mcgrof@kernel.org> <20160824081738.GA8991@visitor2.iram.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160824081738.GA8991@visitor2.iram.es> Sender: linux-doc-owner@vger.kernel.org To: Gabriel Paubert Cc: mcgrof@kernel.org, ming.lei@canonical.com, akpm@linux-foundation.org, gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com, linux-doc@vger.kernel.org, Gilles.Muller@lip6.fr, tiwai@suse.de, Daniel Vetter , Alessandro Rubini , stephen.boyd@linaro.org, bjorn.andersson@linaro.org, teg@jklm.no, chunkeey@googlemail.com, cocci@systeme.lip6.fr, jwboyer@fedoraproject.org, Jonathan Corbet , Kevin Cernekee , Thierry Martinez , linux-serial@vger.kernel.org, jslaby@suse.com, zohar@linux.vnet.ibm.com, arend.vanspriel@broadcom.com, linuxppc-dev@lists.ozlabs.org, Kees Cook , hauke@hauke-m.de, nicolas.palix@imag.fr, Abhay_Salunke@dell.com, Julia.Lawall@lip6.frbr List-Id: linux-serial@vger.kernel.org On Wed, Aug 24, 2016 at 10:17:38AM +0200, Gabriel Paubert wrote: > On Tue, Aug 23, 2016 at 05:45:04PM -0700, mcgrof@kernel.org wrote: > > [snip] > > --- > > Documentation/firmware_class/README | 20 ++++ > > drivers/base/Kconfig | 2 +- > > .../request_firmware-avoid-init-probe-init.cocci | 130 +++++++++++++++++++++ > > 3 files changed, 151 insertions(+), 1 deletion(-) > > create mode 100644 scripts/coccinelle/api/request_firmware-avoid-init-probe-init.cocci > > > > diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README > > index cafdca8b3b15..056d1cb9d365 100644 > > --- a/Documentation/firmware_class/README > > +++ b/Documentation/firmware_class/README > > @@ -93,6 +93,26 @@ > > user contexts to request firmware asynchronously, but can't be called > > in atomic contexts. > > > > +Requirements: > > +============= > > + > > +You should avoid at all costs requesting firmware on both init and probe paths > > +of your device driver. Reason for this is the complexity needed to ensure a > > +firmware will be available for a driver early in boot through different > > +build configurations. Consider built-in drivers needing firmware early, or > > +consider a driver assuming it will only get firmware after pivot_root(). > > + > > +Drivers that really need firmware early should use stuff the firmware in > > Minor grammatical nit: s/use// Fixed, thanks. Luis