All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] firmware: add drvdata API
@ 2016-12-16 11:46 Luis R. Rodriguez
  2016-12-16 11:46 ` [PATCH v3 1/4] firmware: add new extensible firmware API - drvdata Luis R. Rodriguez
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Luis R. Rodriguez @ 2016-12-16 11:46 UTC (permalink / raw)
  To: gregkh, ming.lei
  Cc: wagi, teg, mchehab, zajec5, linux-kernel, markivx, stephen.boyd,
	broonie, zohar, tiwai, johannes, chunkeey, hauke, jwboyer,
	dmitry.torokhov, dwmw2, jslaby, torvalds, luto, fengguang.wu,
	rpurdie, j.anaszewski, Abhay_Salunke, Julia.Lawall,
	Gilles.Muller, nicolas.palix, dhowells, bjorn.andersson,
	arend.vanspriel, kvalo, Luis R. Rodriguez

This series is intended for considering *after* the merge window.

This v3 takes off from where we I last left off [0].  I've put
aside patches not relating to this topic into its own separate
small series [1]. Given the huge amount of confusion over the
firmware API in general and also the firmware "usermode helper"
in that series I also revamped the entire firmware documentation.
Folks should stop calling it firmware "usermode helper" and
simply referring to it as "fallback mechanisms" to avoid any
further confusion.

I followed up with quite a few folks at Plumbers and over e-mail
have been having quite a bit of productive exchanges for the outlook
for the future of what a clean slate for fallback mechanisms can
look like, but one thing is clear -- the current set of fallback
mechanisms are quite a mess. The purpose of this series is to only
add an extensible firmware API onto which we can rely on in the
future for new features.

The fallback mechanism is not addressed yet given the old uevent
fallback mechanism was ripped out form systemd a while ago, and
so considering a clean solution means coordinating well with the
systemd folks. This is in no way urgent given we have only 2 upstream
drivers usign the custom fallback mechanism, and the purpose of
the new extensible API is new features. Part of the new challenges
we've faced (like the pivot root dillema) have been considered by
systemd folks and others and in particular development lead by
Tom Gundersen and Daniel Wagner are addressing the issues we
had not been able to resolve yet in kernelspace by a userspace
solution. For detalis check out their latest firmwared development [2]
work, which is still being advanced. This is what we intend on
relying on for a clean slate solution for a firmware fallback
mechanism eventually.

I've also droped the SmPL patch to help developers convert drivers
for two reasons:

1) We had some bikeshedding name changes and I haven't had time
   to port it and test it
2) It seems some folks were under the incorrect impression that
   the goal was to convert all drivers -- that's not the case, the
   goal is to add a new clean *extensible* API which lets us add
   new features without the mess we have with the current API.

As I had noted in the last series the reason for why using the
drvdata API can incur a bit more code is we require a callback
for the sync call so we can deal with freeing your firmware for
you, as an option. The older API didn't do this.

This converts two drivers just as an example for now, more examples
are available on the test_drvdata driver.

If you want to test pulling the code its up on my linux-next tree
on the 20161216-drvdata-v3 branch.

[0] https://lkml.kernel.org/r/1466121559-22363-1-git-send-email-mcgrof@kernel.org
[1] https://lkml.kernel.org/r/20161216111038.22064-1-mcgrof@kernel.org
[2] https://github.com/teg/firmwared
[3] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux-next.git/log/?h=20161216-drvdata-v3

Luis R. Rodriguez (4):
  firmware: add new extensible firmware API - drvdata
  test: add new drvdata loader tester
  x86/microcode: convert to use sysdata API
  p54: convert to sysdata API

 Documentation/driver-api/firmware/drvdata.rst      |   91 ++
 Documentation/driver-api/firmware/index.rst        |    1 +
 Documentation/driver-api/firmware/introduction.rst |   11 +
 MAINTAINERS                                        |    3 +-
 arch/x86/kernel/cpu/microcode/amd.c                |   56 +-
 drivers/base/firmware_class.c                      |  327 +++++++
 drivers/net/wireless/intersil/p54/eeprom.c         |    2 +-
 drivers/net/wireless/intersil/p54/fwio.c           |    5 +-
 drivers/net/wireless/intersil/p54/led.c            |    2 +-
 drivers/net/wireless/intersil/p54/main.c           |    2 +-
 drivers/net/wireless/intersil/p54/p54.h            |    3 +-
 drivers/net/wireless/intersil/p54/p54pci.c         |   26 +-
 drivers/net/wireless/intersil/p54/p54pci.h         |    4 +-
 drivers/net/wireless/intersil/p54/p54spi.c         |   80 +-
 drivers/net/wireless/intersil/p54/p54spi.h         |    2 +-
 drivers/net/wireless/intersil/p54/p54usb.c         |   18 +-
 drivers/net/wireless/intersil/p54/p54usb.h         |    4 +-
 drivers/net/wireless/intersil/p54/txrx.c           |    2 +-
 include/linux/drvdata.h                            |  245 +++++
 lib/Kconfig.debug                                  |   12 +
 lib/Makefile                                       |    1 +
 lib/test_drvdata.c                                 | 1033 ++++++++++++++++++++
 tools/testing/selftests/firmware/Makefile          |    2 +-
 tools/testing/selftests/firmware/config            |    1 +
 tools/testing/selftests/firmware/drvdata.sh        |  827 ++++++++++++++++
 25 files changed, 2679 insertions(+), 81 deletions(-)
 create mode 100644 Documentation/driver-api/firmware/drvdata.rst
 create mode 100644 include/linux/drvdata.h
 create mode 100644 lib/test_drvdata.c
 create mode 100755 tools/testing/selftests/firmware/drvdata.sh

-- 
2.10.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2017-02-10 14:31 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 11:46 [PATCH v3 0/4] firmware: add drvdata API Luis R. Rodriguez
2016-12-16 11:46 ` [PATCH v3 1/4] firmware: add new extensible firmware API - drvdata Luis R. Rodriguez
2016-12-16 11:46 ` [PATCH v3 2/4] test: add new drvdata loader tester Luis R. Rodriguez
2016-12-16 11:46 ` [PATCH v3 3/4] x86/microcode: convert to use sysdata API Luis R. Rodriguez
2016-12-16 11:46 ` [PATCH v3 4/4] p54: convert to " Luis R. Rodriguez
2016-12-16 17:14   ` Luis R. Rodriguez
2017-01-12 15:02 ` [PATCH v4 0/3] firmware: add drvdata API Luis R. Rodriguez
2017-01-12 15:02   ` [PATCH v4 1/3] firmware: add new extensible firmware API - drvdata Luis R. Rodriguez
2017-01-19 11:36     ` Greg KH
2017-01-19 16:54       ` Luis R. Rodriguez
2017-01-19 18:58     ` Bjorn Andersson
2017-02-03 21:56       ` Luis R. Rodriguez
2017-01-12 15:02   ` [PATCH v4 2/3] test: add new drvdata loader tester Luis R. Rodriguez
2017-01-12 15:02   ` [PATCH v4 3/3] p54: convert to sysdata API Luis R. Rodriguez
2017-01-16 11:32     ` Christian Lamparter
2017-01-19 11:38     ` Greg KH
2017-01-19 16:27       ` Luis R. Rodriguez
2017-01-26 21:50         ` Luis R. Rodriguez
2017-01-26 21:54           ` Linus Torvalds
2017-01-27 18:23             ` Luis R. Rodriguez
2017-01-27 20:53               ` Linus Torvalds
2017-01-27 21:34                 ` Luis R. Rodriguez
2017-01-27  7:47           ` Greg KH
2017-01-27 11:25             ` Rafał Miłecki
2017-01-27 14:07               ` Greg KH
2017-01-27 14:14                 ` Rafał Miłecki
2017-01-27 14:30                   ` Greg KH
2017-01-27 14:39                     ` Rafał Miłecki
2017-01-27 21:27                       ` Luis R. Rodriguez
2017-02-07  1:08   ` [PATCH v5 0/2] firmware: add driver data API Luis R. Rodriguez
2017-02-07  1:08     ` [PATCH v5 1/2] firmware: add extensible " Luis R. Rodriguez
2017-02-07  1:08     ` [PATCH v5 2/2] test: add new driver_data load tester Luis R. Rodriguez
2017-02-10 14:31     ` [PATCH v5 0/2] firmware: add driver data API Greg KH

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.