Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1469177
| From | Gabriel Paubert <paubert@iram.es> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe |
| Date | 2016-08-24 10:30 +0200 |
| Message-ID | <s9BJo-85b-15@gated-at.bofh.it> (permalink) |
| References | <rKOqt-5LX-3@gated-at.bofh.it> <s9uyd-367-5@gated-at.bofh.it> <s9uyd-367-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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// > +initramfs or consider using CONFIG_EXTRA_FIRMWARE. Using initramfs is much > +more portable to more distributions as not all distributions wish to enable > +CONFIG_EXTRA_FIRMWARE. Should a driver require the firmware being built-in > +it should depend on CONFIG_EXTRA_FIRMWARE. There is no current annotation for > +requiring a firmware on initramfs. > + > +If you're a maintainer you can help police this with: > + > +$ export COCCI=scripts/coccinelle/api/request_firmware-avoid-init-probe-init.cocci > +$ make coccicheck MODE=report > > about in-kernel persistence: > ---------------------------
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe mcgrof@kernel.org - 2016-08-24 02:50 +0200 Re: [PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe Gabriel Paubert <paubert@iram.es> - 2016-08-24 10:30 +0200
csiph-web