DMA Engine development
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add sysfs interface to switchtec-dma
@ 2026-07-27 18:48 Logan Gunthorpe
  2026-07-27 18:48 ` [PATCH v2 1/4] dmaengine: add per-channel sysfs attribute groups via chan_groups Logan Gunthorpe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Logan Gunthorpe @ 2026-07-27 18:48 UTC (permalink / raw)
  To: dmaengine, linux-kernel, Vinod Koul
  Cc: Frank Li, Christoph Hellwig, Christophe Jaillet, Dave Jiang,
	Thomas Weißschuh, Kelvin Cao, Logan Gunthorpe

This patch set adds a handful of sysfs attributes to the switchtec-dma
driver.

The first two patches clean up and generalize the technique that
ioat used to add sysfs attributes to a dma channel. The other two
patches add a couple different sets of sysfs attributes that are useful
in configuring and monitoring the hardware.

This patch set is based on the miscellaneous fixes series I sent
earlier[1].

Logan

[1] https://lore.kernel.org/all/20260727181526.9672-1-logang@deltatee.com/

Changes since v1:
 - Replaced the per-channel embedded-kobject approach entirely with a
   new dma_device.chan_groups mechanism that attaches driver sysfs
   attributes directly to the channel's existing struct device
   instead of a second, separately-managed kobject. (Per Sashiko)
 - Fixed the busy-channel check in perf_cfg_store(): it now returns
   -EBUSY instead of falsely reporting success, and the racy lockless
   chan->client_count check has been replaced with a hw_cfg_locked
   flag that's set/cleared under hw_ctrl_lock from
   alloc/free_chan_resources(), closing a TOCTOU window against
   concurrent channel allocation. (Per Sashiko)
 - Took the hw_ctrl_lock around the perf_cfg read-modify-write
   so concurrent sysfs writes to different config attributes can't
   interleave and lose an update. (Per Sashiko)
 - Converted latency_selector_show() from strcat() to
   sysfs_emit()/sysfs_emit_at(). (Per Sashiko)
 - The PCI1008 device ID patch has been removed from this
   series, expanded and sent separately.

Logan Gunthorpe (4):
  dmaengine: add per-channel sysfs attribute groups via chan_groups
  dmaengine: ioatdma: convert per-channel sysfs to chan_groups
  dmaengine: switchtec-dma: add config sysfs attributes
  dmaengine: switchtec-dma: add pmon sysfs attributes

 drivers/dma/dmaengine.c     |  27 +++
 drivers/dma/dmaengine.h     |  19 ++
 drivers/dma/ioat/dma.h      |   6 +-
 drivers/dma/ioat/init.c     |   5 +-
 drivers/dma/ioat/sysfs.c    | 166 ++++++-------
 drivers/dma/switchtec_dma.c | 452 ++++++++++++++++++++++++++++++++++++
 include/linux/dmaengine.h   |   4 +
 7 files changed, 569 insertions(+), 110 deletions(-)


base-commit: 0428de2e30c4690e119db5ee4b27725216b61de8
--
2.47.3

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

end of thread, other threads:[~2026-07-27 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 18:48 [PATCH v2 0/4] Add sysfs interface to switchtec-dma Logan Gunthorpe
2026-07-27 18:48 ` [PATCH v2 1/4] dmaengine: add per-channel sysfs attribute groups via chan_groups Logan Gunthorpe
2026-07-27 18:48 ` [PATCH v2 2/4] dmaengine: ioatdma: convert per-channel sysfs to chan_groups Logan Gunthorpe
2026-07-27 18:48 ` [PATCH v2 3/4] dmaengine: switchtec-dma: add config sysfs attributes Logan Gunthorpe
2026-07-27 18:48 ` [PATCH v2 4/4] dmaengine: switchtec-dma: add pmon " Logan Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox