linux-stable/drivers/bus/fsl-mc
Ioana Ciornei 2cf1e703f0 bus: fsl-mc: add fsl-mc userspace support
Adding userspace support for the MC (Management Complex) means exporting
an ioctl capable device file representing the root resource container.

This new functionality in the fsl-mc bus driver intends to provide
userspace applications an interface to interact with the MC firmware.

Commands that are composed in userspace are sent to the MC firmware
through the FSL_MC_SEND_MC_COMMAND ioctl.  By default the implicit MC
I/O portal is used for this operation, but if the implicit one is busy,
a dynamic portal is allocated and then freed upon execution.

The command received through the ioctl interface is checked against a
known whitelist of accepted MC commands. Commands that attempt a change
in hardware configuration will need CAP_NET_ADMIN, while commands used
in debugging do not need it.

Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20210114170752.2927915-4-ciorneiioana@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 15:13:52 +01:00
..
dpbp.c bus: fsl-mc: remove duplicated include files 2018-12-06 15:53:20 +01:00
dpcon.c bus: fsl-mc: remove duplicated include files 2018-12-06 15:53:20 +01:00
dpmcp.c bus: fsl-mc: change mc_command in fsl_mc_command 2018-03-23 15:52:48 +01:00
dprc-driver.c bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
dprc.c bus: fsl-mc: added missing fields to dprc_rsp_get_obj_region structure 2020-12-09 19:50:53 +01:00
fsl-mc-allocator.c bus: fsl-mc: fix error return code in fsl_mc_object_allocate() 2020-12-09 19:51:06 +01:00
fsl-mc-bus.c bus: fsl-mc: add missing __iomem attribute 2021-01-07 20:26:52 +01:00
fsl-mc-msi.c bus: fsl-mc: Add ACPI support for fsl-mc 2020-07-28 15:51:32 +01:00
fsl-mc-private.h bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
fsl-mc-uapi.c bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
Kconfig bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
Makefile bus: fsl-mc: add fsl-mc userspace support 2021-01-27 15:13:52 +01:00
mc-io.c bus/fsl_mc: Do not rely on caller to provide non NULL mc_io 2020-10-02 16:05:01 +02:00
mc-sys.c bus: fsl-mc: export mc_cmd_hdr_read_cmdid() to the fsl-mc bus 2021-01-27 15:13:52 +01:00