All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioana Ciornei <ioana.ciornei@nxp.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev-owner@vger.kernel.org" <netdev-owner@vger.kernel.org>,
	Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>,
	Horia Geanta <horia.geanta@nxp.com>, Leo Li <leoyang.li@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: [PATCH v2 0/4] bus: fsl-mc: enhance Management Complex userspace support
Date: Fri, 16 Nov 2018 17:55:40 +0000	[thread overview]
Message-ID: <1542390890-3270-1-git-send-email-ioana.ciornei@nxp.com> (raw)

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

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       |  43 +++++++
 drivers/bus/fsl-mc/fsl-mc-uapi.c          | 179 ++++++++++++++++++++++++++++++
 include/linux/fsl/mc.h                    |   8 +-
 include/uapi/linux/fsl_mc.h               |  34 ++++++
 11 files changed, 381 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

-- 
1.9.1


             reply	other threads:[~2018-11-16 17:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 17:55 Ioana Ciornei [this message]
2018-11-16 17:55 ` [PATCH v2 1/4] bus: fsl-mc: move fsl_mc_command struct in a uapi header Ioana Ciornei
2018-11-16 17:55 ` [PATCH v2 2/4] bus: fsl-mc: add fsl-mc userspace support Ioana Ciornei
2018-11-16 19:47   ` gregkh
2018-11-19 10:33     ` Ioana Ciornei
2018-11-16 17:55 ` [PATCH v2 3/4] bus: fsl-mc: add root dprc rescan attribute Ioana Ciornei
2018-11-16 17:55 ` [PATCH v2 4/4] bus: fsl-mc: add bus " Ioana Ciornei

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=1542390890-3270-1-git-send-email-ioana.ciornei@nxp.com \
    --to=ioana.ciornei@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=horia.geanta@nxp.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-owner@vger.kernel.org \
    --cc=ruxandra.radulescu@nxp.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 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.