All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Warner Losh <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Peter Griffin
	<peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Maxime Coquelin <maxime.coquelin-qxv4g6HH51o@public.gmane.org>,
	Patrice Chotard <patrice.chotard-qxv4g6HH51o@public.gmane.org>,
	Ludovic Barre <ludovic.barre-qxv4g6HH51o@public.gmane.org>,
	"devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: st_fdma: Firmware filename in DT?
Date: Mon, 7 Sep 2015 11:30:11 +0100	[thread overview]
Message-ID: <55ED6733.7050807@linaro.org> (raw)
In-Reply-To: <201509051125.43527.arnd-r2nGTMty4D4@public.gmane.org>

On 05/09/15 10:25, Arnd Bergmann wrote:
> On Friday 04 September 2015, Rob Herring wrote:
>> On Fri, Sep 4, 2015 at 9:27 AM, Warner Losh <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org> wrote:
>>>> On Sep 4, 2015, at 4:21 AM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>>>>>>>> We could do it by parsing the node name e.g. fdma0-audio, or by adding
>>> FreeBSD would generally put these things in /boot/firmware and
>>> it has a generalized mechanism to load the firmware at run time
>>> that’s based on this. While the path names are flexible, having
>>> the firmware live in a central place is useful from an automation
>>> point of view. Having just a name, and not a full path, enables
>>> this policy, while still allowing others to have other policies.
>>>
>>> Linux distributions would be free to do whatever they wanted
>>> and implement other policies than FreeBSD.
>>>
>>> So a property like this, with the semantics discussed, seems to
>>> meet the OS independent test.
>>
>> Good. I'll await a binding to review...
>>
>> I would suggest "firmware-names" to be consistent with other naming
>> convention and because their can be more than one (either at the same
>> time or as fallback). It also leaves "firmware" available if we want
>> to have phandle's to firmware embedded in the DT at some point later.
>
> Having list of strings would certainly make this more flexible than
> just a single string, for the same reason as taking the list of
> compatible values as the base, so +1 for "firmware-names" over "firmware".

I was recently thinking about how DT filenames would interact with 
incompatible ABI changes to the firmware's register and/or wire protocol.

Just for example we start with f/ware ABI A and we create a mainline 
kernel X that supported it.

Vendor now releases a new firmware with ABI B and we update the mainline 
driver to support ABI A (to avoid breaking old userspaces) and B, 
eventually releasing kernel Y.

The question now is how kernels X and Y should use the DT to generate 
the filename. It is very desirable that kernels X and Y use *different* 
filenames because otherwise a single userspace could not support the new 
feature *and* boot with both X and Y.

Having lists of firmwares can certainly help solve this (providing the 
list can be used to allow a driver to select for an ABI is supports). 
However I afraid I find this example argues against having filenames in 
DT at all because it seems odd to me that, for kernel and userspace to 
adopt ABI B that must wait until the DT is updated to include support 
for ABI B. The hardware didn't change...


Daniel.

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Thompson <daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Warner Losh <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Peter Griffin
	<peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Maxime Coquelin <maxime.coquelin-qxv4g6HH51o@public.gmane.org>,
	Patrice Chotard <patrice.chotard-qxv4g6HH51o@public.gmane.org>,
	Ludovic Barre <ludovic.barre-qxv4g6HH51o@public.gmane.org>,
	"devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: st_fdma: Firmware filename in DT?
Date: Mon, 7 Sep 2015 11:30:11 +0100	[thread overview]
Message-ID: <55ED6733.7050807@linaro.org> (raw)
In-Reply-To: <201509051125.43527.arnd-r2nGTMty4D4@public.gmane.org>

On 05/09/15 10:25, Arnd Bergmann wrote:
> On Friday 04 September 2015, Rob Herring wrote:
>> On Fri, Sep 4, 2015 at 9:27 AM, Warner Losh <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org> wrote:
>>>> On Sep 4, 2015, at 4:21 AM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>>>>>>>> We could do it by parsing the node name e.g. fdma0-audio, or by adding
>>> FreeBSD would generally put these things in /boot/firmware and
>>> it has a generalized mechanism to load the firmware at run time
>>> that’s based on this. While the path names are flexible, having
>>> the firmware live in a central place is useful from an automation
>>> point of view. Having just a name, and not a full path, enables
>>> this policy, while still allowing others to have other policies.
>>>
>>> Linux distributions would be free to do whatever they wanted
>>> and implement other policies than FreeBSD.
>>>
>>> So a property like this, with the semantics discussed, seems to
>>> meet the OS independent test.
>>
>> Good. I'll await a binding to review...
>>
>> I would suggest "firmware-names" to be consistent with other naming
>> convention and because their can be more than one (either at the same
>> time or as fallback). It also leaves "firmware" available if we want
>> to have phandle's to firmware embedded in the DT at some point later.
>
> Having list of strings would certainly make this more flexible than
> just a single string, for the same reason as taking the list of
> compatible values as the base, so +1 for "firmware-names" over "firmware".

I was recently thinking about how DT filenames would interact with 
incompatible ABI changes to the firmware's register and/or wire protocol.

Just for example we start with f/ware ABI A and we create a mainline 
kernel X that supported it.

Vendor now releases a new firmware with ABI B and we update the mainline 
driver to support ABI A (to avoid breaking old userspaces) and B, 
eventually releasing kernel Y.

The question now is how kernels X and Y should use the DT to generate 
the filename. It is very desirable that kernels X and Y use *different* 
filenames because otherwise a single userspace could not support the new 
feature *and* boot with both X and Y.

Having lists of firmwares can certainly help solve this (providing the 
list can be used to allow a driver to select for an ABI is supports). 
However I afraid I find this example argues against having filenames in 
DT at all because it seems odd to me that, for kernel and userspace to 
adopt ABI B that must wait until the DT is updated to include support 
for ABI B. The hardware didn't change...


Daniel.

  parent reply	other threads:[~2015-09-07 10:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 14:49 st_fdma: Firmware filename in DT? Peter Griffin
2015-09-03 21:45 ` Rob Herring
     [not found]   ` <CAL_JsqKQqbAQCPR6xuR2Ke5gEdX4kQYb29-W3qNaZqjM_JBoYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-04  6:59     ` Lee Jones
2015-09-04  9:20       ` Peter Griffin
2015-09-04 10:21         ` Lee Jones
2015-09-04 13:04           ` Arnd Bergmann
2015-09-04 13:04             ` Arnd Bergmann
     [not found]             ` <201509041504.38412.arnd-r2nGTMty4D4@public.gmane.org>
2015-09-04 13:26               ` Lee Jones
2015-09-04 13:44                 ` Rob Herring
2015-09-04 13:44                   ` Rob Herring
     [not found]                   ` <CAL_Jsq+XpBV+BMMq1gYnvKtv6O5mjqVw6zsP4G-4Za3cQm9PzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-04 13:54                     ` Lee Jones
2015-09-04 14:36                       ` Warner Losh
2015-09-05  9:17                 ` Arnd Bergmann
2015-09-05  9:17                   ` Arnd Bergmann
     [not found]                   ` <201509051117.59751.arnd-r2nGTMty4D4@public.gmane.org>
2015-09-08  3:14                     ` David Gibson
2015-09-04 14:30               ` Warner Losh
     [not found]                 ` <C93CEE95-AF30-4B2D-BD96-66733B282414-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2015-09-05  8:58                   ` Arnd Bergmann
2015-09-05 21:06                     ` Warner Losh
     [not found]                       ` <CANCZdfrLbbN_nGJ8WLsBHHGuM3SxGgiLgjkZ+YG4zP4BBA68YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07 12:41                         ` Arnd Bergmann
2015-09-04 14:27           ` Warner Losh
     [not found]             ` <5E0DCAA5-DB90-4682-92F2-061A07FE973E-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2015-09-04 19:04               ` Rob Herring
     [not found]                 ` <CAL_Jsq+bw1TcXt0c8L4BSvwWK82L2cG-qdw369EkvxWe-5RXbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-05  9:25                   ` Arnd Bergmann
2015-09-05  9:25                     ` Arnd Bergmann
     [not found]                     ` <201509051125.43527.arnd-r2nGTMty4D4@public.gmane.org>
2015-09-07 10:30                       ` Daniel Thompson [this message]
2015-09-07 10:30                         ` Daniel Thompson
     [not found]                         ` <55ED6733.7050807-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-07 12:33                           ` Arnd Bergmann
2015-09-07 14:36                             ` Daniel Thompson
     [not found]                               ` <55EDA0EB.1040501-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-07 15:59                                 ` Arnd Bergmann
2015-09-10 14:18                                 ` Peter Griffin
2015-09-11  9:17                                   ` Lee Jones
2015-09-11  9:17                                     ` Lee Jones
2015-09-11  9:21                                     ` Arnd Bergmann
2015-09-11  9:39                                       ` Lee Jones
2015-09-11  9:39                                         ` Lee Jones
2015-09-11  9:46                                     ` Peter Griffin
2015-09-11 10:25                                       ` Lee Jones
2015-09-11 10:25                                         ` Lee Jones
2015-09-11 12:31                                         ` Peter Griffin
2015-09-11 12:31                                           ` Peter Griffin
2015-09-04 16:19           ` Daniel Thompson
2015-09-04 16:19             ` Daniel Thompson
2015-09-04  8:46     ` Peter Griffin
2015-09-08  2:57     ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55ED6733.7050807@linaro.org \
    --to=daniel.thompson-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ludovic.barre-qxv4g6HH51o@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=maxime.coquelin-qxv4g6HH51o@public.gmane.org \
    --cc=patrice.chotard-qxv4g6HH51o@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.