linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: gregkh@linuxfoundation.org, ming.lei@canonical.com
Cc: wagi@monom.org, teg@jklm.no, mchehab@osg.samsung.com,
	zajec5@gmail.com, linux-kernel@vger.kernel.org,
	markivx@codeaurora.org, stephen.boyd@linaro.org,
	broonie@kernel.org, zohar@linux.vnet.ibm.com, tiwai@suse.de,
	johannes@sipsolutions.net, chunkeey@googlemail.com,
	hauke@hauke-m.de, jwboyer@fedoraproject.org,
	dmitry.torokhov@gmail.com, dwmw2@infradead.org, jslaby@suse.com,
	torvalds@linux-foundation.org, luto@amacapital.net,
	fengguang.wu@intel.com, rpurdie@rpsys.net,
	j.anaszewski@samsung.com, Abhay_Salunke@dell.com,
	Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr,
	nicolas.palix@imag.fr, dhowells@redhat.com,
	bjorn.andersson@linaro.org, arend.vanspriel@broadcom.com,
	kvalo@codeaurora.org, "Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: [PATCH v3 0/4] firmware: add drvdata API
Date: Fri, 16 Dec 2016 03:46:28 -0800	[thread overview]
Message-ID: <20161216114632.22559-1-mcgrof@kernel.org> (raw)

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

             reply	other threads:[~2016-12-16 11:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 11:46 Luis R. Rodriguez [this message]
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

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=20161216114632.22559-1-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=Abhay_Salunke@dell.com \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=arend.vanspriel@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=chunkeey@googlemail.com \
    --cc=dhowells@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hauke@hauke-m.de \
    --cc=j.anaszewski@samsung.com \
    --cc=johannes@sipsolutions.net \
    --cc=jslaby@suse.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=markivx@codeaurora.org \
    --cc=mchehab@osg.samsung.com \
    --cc=ming.lei@canonical.com \
    --cc=nicolas.palix@imag.fr \
    --cc=rpurdie@rpsys.net \
    --cc=stephen.boyd@linaro.org \
    --cc=teg@jklm.no \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    --cc=wagi@monom.org \
    --cc=zajec5@gmail.com \
    --cc=zohar@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).