linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] bus: fsl-mc: add userspace support
@ 2021-01-14 17:07 Ioana Ciornei
  2021-01-14 17:07 ` [PATCH 1/5] bus: fsl-mc: move fsl_mc_command struct in a uapi header Ioana Ciornei
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Ioana Ciornei @ 2021-01-14 17:07 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: laurentiu.tudor, Ioana Ciornei

From: Ioana Ciornei <ioana.ciornei@nxp.com>

This patch set adds userspace support in the fsl-mc bus along with a
rescan attribute to the root DPRC container. An earlier discussion on
this functionality can be found at the link below. I didn't continue
with the versioning scheme since quite some time has passed since the
last discussion.
https://lkml.org/lkml/2018/11/20/1162

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: 
 - Get layout information about the available resources abstracted and
   exported by the Management Complex firmware. This is especially
   useful to generate a complete description of the current hardware
   resource partitioning.
 - Manage DPAA2 objects lifecycle (create, destroy) and establish
   connection between different components 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.

Each command received through the ioctl interface is first checked
against a list of accepted MC commands. Also, commands which would alter
the hardware resource management require CAP_NET_ADMIN.  The command is
also check so that it does not contain garbage beyond the maximum size
expected for that command id.

Ioana Ciornei (5):
  bus: fsl-mc: move fsl_mc_command struct in a uapi header
  bus: fsl-mc: export mc_cmd_hdr_read_cmdid() to the fsl-mc bus
  bus: fsl-mc: add fsl-mc userspace support
  bus: fsl-mc: add bus rescan attribute
  bus: fsl-mc: add autorescan sysfs

 Documentation/ABI/stable/sysfs-bus-fsl-mc     |  19 +
 .../userspace-api/ioctl/ioctl-number.rst      |   1 +
 MAINTAINERS                                   |   2 +
 drivers/bus/fsl-mc/Kconfig                    |   7 +
 drivers/bus/fsl-mc/Makefile                   |   3 +
 drivers/bus/fsl-mc/dprc-driver.c              |  33 +-
 drivers/bus/fsl-mc/fsl-mc-bus.c               |  96 +++
 drivers/bus/fsl-mc/fsl-mc-private.h           |  49 ++
 drivers/bus/fsl-mc/fsl-mc-uapi.c              | 547 ++++++++++++++++++
 drivers/bus/fsl-mc/mc-sys.c                   |   2 +-
 include/linux/fsl/mc.h                        |   8 +-
 include/uapi/linux/fsl_mc.h                   |  34 ++
 12 files changed, 789 insertions(+), 12 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

-- 
2.29.2


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

end of thread, other threads:[~2021-01-27 14:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 17:07 [PATCH 0/5] bus: fsl-mc: add userspace support Ioana Ciornei
2021-01-14 17:07 ` [PATCH 1/5] bus: fsl-mc: move fsl_mc_command struct in a uapi header Ioana Ciornei
2021-01-14 17:07 ` [PATCH 2/5] bus: fsl-mc: export mc_cmd_hdr_read_cmdid() to the fsl-mc bus Ioana Ciornei
2021-01-14 17:07 ` [PATCH 3/5] bus: fsl-mc: add fsl-mc userspace support Ioana Ciornei
2021-01-14 17:07 ` [PATCH 4/5] bus: fsl-mc: add bus rescan attribute Ioana Ciornei
2021-01-14 17:07 ` [PATCH 5/5] bus: fsl-mc: add autorescan sysfs Ioana Ciornei
2021-01-27 14:02 ` [PATCH 0/5] bus: fsl-mc: add userspace support Greg KH
2021-01-27 14:06   ` Laurentiu Tudor
2021-01-27 14:05 ` Laurentiu Tudor

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).