lkml.org 
[lkml]   [2016]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v3 0/4] firmware: add drvdata API
Date
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

\
 
 \ /
  Last update: 2016-12-16 12:48    [W:0.194 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site