Re: [GIT *] Allow request_firmware() to be satisfied from in-kernel, use it in more drivers.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Theodore Tso <tytso@...>
Cc: Jeff Garzik <jeff@...>, Linus Torvalds <torvalds@...>, <david@...>, Arjan van de Ven <arjan@...>, Andrew Morton <akpm@...>, <alan@...>, <linux-kernel@...>
Date: Tuesday, July 15, 2008 - 3:27 pm

On Tue, 2008-07-15 at 14:58 -0400, Theodore Tso wrote:

The more important question is whether _Linus_ will take it, and of
course I can't answer for him.

Personally I think it's pointless. But since it's only _mildly_
counterproductive, if you really want to do it then I wouldn't actively
oppose it unless it turns out to be a mess to implement, or unless it's
limited to working only with the in-tree firmware.

If you implement it cleanly and optionally (and defaulting off), and if
it works properly with out-of-tree firmware too (so I can build a
libertas usb8xxx.ko module with the firmware included, for example),
then I certainly wouldn't throw my toys out of the pram over it.
Ideally, it would work for out-of-tree drivers (make M=... modules) too.

I was thinking that we could maybe post-process .ko files (which we do
already for other reasons), and add a special section in them containing
the firmware which is mentioned in MODULE_FIRMWARE() tags. The special
section is how we do it for the kernel too. That would take a little bit
of code in module.c to keep track of those sections and add them to a
list somewhere that firmware_class.c can see them, and then you have to
think about lifetime and locking issues.

But those were just preliminary thoughts -- I wasn't really planning to
implement it so I didn't go through it in detail.

An alternative approach might be to turn firmware blobs into actual
modules, which just register themselves with the firmware loader in
module_init(). I'm not sure I like that approach though, and depmod
wouldn't 'notice' them automatically so it wouldn't work with current
userspace. I've tried to be very careful to ensure that anything we do
here is entirely compatible with existing userspace.

-- 
dwmw2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Prosaic firmware issues, Alexey Dobriyan, (Tue Jul 15, 9:11 pm)
Re: Prosaic firmware issues, Linus Torvalds, (Tue Jul 15, 9:45 pm)
Re: Prosaic firmware issues, David Woodhouse, (Wed Jul 16, 1:54 am)
Re: Prosaic firmware issues, Alexey Dobriyan, (Wed Jul 16, 10:19 am)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Henrique de Moraes Holschuh..., (Tue Jul 15, 2:05 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Arjan van de Ven, (Tue Jul 15, 12:04 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Benjamin Herrenschmidt, (Tue Jul 15, 1:05 am)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Benjamin Herrenschmidt, (Tue Jul 15, 1:15 am)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Arjan van de Ven, (Tue Jul 15, 12:56 am)
Re: [GIT *] Allow request_firmware() to be satisfied , Oliver Neukum, (Tue Jul 15, 2:23 am)
Re: [GIT *] Allow request_firmware() to be satisfied , Oliver Neukum, (Tue Jul 15, 12:52 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., David Woodhouse, (Tue Jul 15, 3:27 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Rafael J. Wysocki, (Tue Jul 15, 4:45 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Rafael J. Wysocki, (Wed Jul 16, 5:28 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Rafael J. Wysocki, (Thu Jul 17, 4:42 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Rafael J. Wysocki, (Thu Jul 17, 6:25 pm)
Re: [GIT *] Allow request_firmware() to be satisfied from in..., Rafael J. Wysocki, (Tue Jul 15, 7:45 pm)