bus: fsl-mc: enhance Management Complex userspace support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/24 patches 7 repliesIn review
- v2 posting 2/24 patches 2 repliesSuperseded
- v3 posting 1/24 patches 34 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 1/2 | 6 patches | 3 replies | Superseded | |
| v1 | 3 patches | 4 replies | Superseded |
Changes in v3 from the cover letter
- use dev_ instead of pr_
- remove dynamic_instance_count and uapi_created variables
- do not assign true to a u32
- return the actual error code (the decision to defer is for the caller)
Patches in v3 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bus: fsl-mc: move fsl_mc_command struct in a uapi headerMAINTAINERS include/ include/ | +27 | 0 replies | |
| 2/4 | bus: fsl-mc: add fsl-mc userspace supportDocumentation/ drivers/ drivers/ +4 more | +240 | 7 replies | |
| 3/4 | bus: fsl-mc: add root dprc rescan attributeDocumentation/ MAINTAINERS drivers/ | +46 | 0 replies | |
| 4/4 | bus: fsl-mc: add bus rescan attributeDocumentation/ drivers/ drivers/ +1 more | +55 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/4] bus: fsl-mc: enhance Management Complex userspace support
This patch set adds userspace support in the fsl-mc bus along with a rescan attribute to the root DPRC container. Also, the patches here depend on one other patch submitted but not yet accepted:
- https://lkml.org/lkml/2018/11/15/776
An earlier discussion on this functionality can be found here:
https://lkml.org/lkml/2018/3/23/941
The FSL_MC_SEND_MC_COMMAND ioctl acts as a direct passthrough to the Management Complex (or MC) by passing fixed-length command/response pairs. Keeping in mind that the MC manages DPAA2 hardware resources and provides and object-based abstraction for sofware drivers, the proposed ioctl interface enables userspace tools to do the following:
- create and destroy DPAA2 objects
- manage the DPRC container that objects live in (by moving objects between containers)
- establish connections between different objects as needed
The ioctl interface is intended for dynamic usecases where DPAA2 objects need to be created on demand or destroyed so that the underlying hardware resources can be further repurposed. In static usecases, depending on the requirements, a firmware configuration file can be used to describe the needed DPAA2 objects, their attributes or any link between them.
Some examples of device drivers that probe on said DPAA2 objects are listed
below:
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/soc/fsl/dpio
- https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/drivers/net/ethernet/freescale/dpaa2
- https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/tree/drivers/crypto/caam/
Having a low-level ioctl interface where the command is passed through to the MC without any intervention from the fsl-mc bus reduces the complexity added in the kernel while also making the command structure, in turn the ioctl, very stable.
Changes in v2:
- use root dprc MC portal by default
- create the uapi misc device from the root dprc probe function
- remove the rescan dev_attr on the remove path
Changes in v3:
- use dev_ instead of pr_
- remove dynamic_instance_count and uapi_created variables
- do not assign true to a u32
- return the actual error code (the decision to defer is for the caller)
Ioana Ciornei (4):
bus: fsl-mc: move fsl_mc_command struct in a uapi header
bus: fsl-mc: add fsl-mc userspace support
bus: fsl-mc: add root dprc rescan attribute
bus: fsl-mc: add bus rescan attribute
Documentation/ABI/stable/sysfs-bus-fsl-mc | 19 ++++ Documentation/ioctl/ioctl-number.txt | 1 + MAINTAINERS | 2 + drivers/bus/fsl-mc/Kconfig | 7 ++ drivers/bus/fsl-mc/Makefile | 3 + drivers/bus/fsl-mc/dprc-driver.c | 54 +++++++++- drivers/bus/fsl-mc/fsl-mc-bus.c | 41 ++++++++ drivers/bus/fsl-mc/fsl-mc-private.h | 41 ++++++++ drivers/bus/fsl-mc/fsl-mc-uapi.c | 168 ++++++++++++++++++++++++++++++ include/linux/fsl/mc.h | 8 +- include/uapi/linux/fsl_mc.h | 34 ++++++ 11 files changed, 368 insertions(+), 10 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-bus-fsl-mc create mode 100644 drivers/bus/fsl-mc/fsl-mc-uapi.c create mode 100644 include/uapi/linux/fsl_mc.h
Signature · 1 line
1.9.1