Add sysfs interface to switchtec-dma
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 7 repliesIn review
- v34 patches 1 replySuperseded
- v24 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 1 reply | Superseded |
Changes in v4 from the cover letter
- Added Dave Jiang's Reviewed-by tag
- Rebased on v7.4-rc2
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dmaengine: add per-channel sysfs attribute groups via chan_groupsdrivers/ drivers/ include/ | +50 | 3 replies | |
| 2/4 | dmaengine: ioatdma: convert per-channel sysfs to chan_groupsdrivers/ drivers/ drivers/ | +67 | 1 reply | |
| 3/4 | dmaengine: switchtec-dma: add config sysfs attributesdrivers/ | +179 | 1 reply | |
| 4/4 | dmaengine: switchtec-dma: add pmon sysfs attributesdrivers/ | +273 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Dave Jiang | Frank Li |
|---|---|---|
| 1/4 | R-b | |
| 2/4 | R-b | R-b |
| 3/4 | R-b | |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] Add sysfs interface to switchtec-dma
This is mostly a resend of my series last week. I'm really hoping to get this in this cycle as this is the work I actually need to get done and the bug fixes are something of a side project.
This patch set adds a handful of sysfs attributes to the switchtec-dma driver. This is the 4th version which I'm hoping to get it in now that my bug fixes and cleanup branch from Sashiko feedback was merged.
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 v7.4-rc2.
Logan
[v3] https://lore.kernel.org/all/[email protected]/
--
Changes since v3:
- Added Dave Jiang's Reviewed-by tag
- Rebased on v7.4-rc2
Changes since v2:
- Renamed the new channel lookup helpers to use the dmaengine_ prefix:
dma_chan_from_dev_lock() and dma_chan_from_dev_unlock() are now dmaengine_chan_from_dev_lock() and dmaengine_chan_from_dev_unlock(), and the dma_chan_from_dev CLASS is now dmaengine_chan_from_dev. (Per Frank Li)
- Rebased on v7.4-rc1
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: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
Signature · 1 line
2.47.3