summary refs log tree commit diff
path: root/drivers/dma/idxd/dma.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2021-07-15 11:44:47 -0700
committerVinod Koul <vkoul@kernel.org>2021-07-21 10:09:16 +0530
commit6e7f3ee97bbe2c7d7a53b7dbd7a08a579e03c8c9 (patch)
treec9e9476cf28d5b54ee9ab97a7dbd1e2a40fd1fbf /drivers/dma/idxd/dma.c
parentd9e5481fca74f870cf2fc2f90a0e77e85c0b5b86 (diff)
downloadlinux-6e7f3ee97bbe2c7d7a53b7dbd7a08a579e03c8c9.tar.gz
dmaengine: idxd: move dsa_drv support to compatible mode
The original architecture of /sys/bus/dsa invented a scheme whereby
a single entry in the list of bus drivers, /sys/bus/drivers/dsa,
handled all device types and internally routed them to different
different drivers. Those internal drivers were invisible to
userspace.

With the idxd driver transitioned to a proper bus device-driver model,
the legacy behavior needs to be preserved due to it being exposed to
user space via sysfs. Create a compat driver to provide the legacy
behavior for /sys/bus/dsa/drivers/dsa. This should satisfy user
tool accel-config v3.2 or ealier where this behavior is expected.
If the distro has a newer accel-config then the legacy mode does
not need to be enabled.

When the compat driver binds the device (i.e. dsa0) to the dsa driver,
it will be bound to the new idxd_drv. The wq device (i.e. wq0.0) will
be bound to either the dmaengine_drv or the user_drv. The dsa_drv
becomes a routing mechansim for the new drivers. It will not support
additional external drivers that are implemented later.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/162637468705.744545.4399080971745974435.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/dma.c')
-rw-r--r--drivers/dma/idxd/dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c
index 7e3281700183..2fd7ec29a08f 100644
--- a/drivers/dma/idxd/dma.c
+++ b/drivers/dma/idxd/dma.c
@@ -339,3 +339,4 @@ struct idxd_device_driver idxd_dmaengine_drv = {
 	.name = "dmaengine",
 	.type = dev_types,
 };
+EXPORT_SYMBOL_GPL(idxd_dmaengine_drv);