dmaengine: Move kdoc description of struct dma_chan_percpu closer to it
Subsystems (2)
PATCH 1/2 dmaengine: Move kdoc description of struct dma_chan_percpu closer to it
We have split by unknown reason of kdoc and struct dma_chan_percpu definition. Join them back. No functional change.
Signed-off-by Andy Shevchenko <[email protected]>
--- include/linux/dmaengine.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
include/linux/dmaengine.h +5 -6
@@ -229,12 +229,6 @@ enum sum_check_flags {*/ typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; -/** -* struct dma_chan_percpu - the per-CPU part of struct dma_chan -* @memcpy_count: transaction counter -* @bytes_transferred: byte counter -*/ -/** * enum dma_desc_metadata_mode - per descriptor metadata mode types supported * @DESC_METADATA_CLIENT - the metadata buffer is allocated/provided by the
@@ -291,6 +285,11 @@ enum dma_desc_metadata_mode { DESC_METADATA_ENGINE = BIT(1), }; +/** +* struct dma_chan_percpu - the per-CPU part of struct dma_chan +* @memcpy_count: transaction counter +* @bytes_transferred: byte counter +*/ struct dma_chan_percpu {/* stats */ unsigned long memcpy_count;
Signature · 1 line
2.30.2
PATCH 2/2 dmaengine: hsu: Account transferred bytes
Bump statistics for transferred bytes at the event of the successful transfer.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/hsu/hsu.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/dma/hsu/hsu.c +3 -0
@@ -201,6 +201,7 @@ EXPORT_SYMBOL_GPL(hsu_dma_get_status);*/ int hsu_dma_do_irq (struct hsu_dma_chip *chip,unsigned short nr,u32 status) { +struct dma_chan_percpu *stat;struct hsu_dma_chan *hsuc;struct hsu_dma_desc *desc;unsigned long flags;
@@ -210,6 +211,7 @@ int hsu_dma_do_irq(struct hsu_dma_chip *chip, unsigned short nr, u32 status)return 0 ; hsuc = &chip->hsu->chan[nr]; + stat =this_cpu_ptr (hsuc->vchan.chan.local);spin_lock_irqsave (&hsuc->vchan.lock, flags); desc = hsuc->desc;
@@ -221,6 +223,7 @@ int hsu_dma_do_irq(struct hsu_dma_chip *chip, unsigned short nr, u32 status) }else {vchan_cookie_complete (&desc->vdesc); desc->status =DMA_COMPLETE ; + stat->bytes_transferred += desc->length;hsu_dma_start_transfer (hsuc); } }
Signature · 1 line
2.30.2
Quoted 2 lines · Andy Shevchenko
We have split by unknown reason of kdoc and struct
dma_chan_percpudefinition. Join them back. No functional change.
Applied both, thanks
Signature · 1 line
~Vinod