docs: dmaengine: clarify ordering rules around cookie completion
Subsystems (2)
Vinod Koul
maintainerPATCH 1/1 docs: dmaengine: clarify ordering rules around cookie completion
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
--- Documentation/driver-api/dmaengine/provider.rst | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/driver-api/dmaengine/provider.rst +5 -0
@@ -557,6 +557,11 @@ dma_cookie_t - Not really relevant any more since the introduction of ``virt-dma`` that abstracts it away. +- dmaengine drivers need to ensure buffers are flushed before invoking + vchan_cookie_complete() or dma_cookie_complete(). This would imply a call + to unmapping buffers or any such architcure calls to ensure caller seeing + buffers are flushed is done before invoking these calls. + dma_vec - A small structure that contains a DMA address and length.
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] docs: typo 'architcure' and grammatical errors in dmaengine provider documentation --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] docs: typo 'architcure' and grammatical errors in dmaengine provider documentation --
commit 5e1e4fe7c0e4434abe23aff6f6d55d9b232ea575
Author: Vinod Koul <[email protected]>
docs: dmaengine: clarify ordering rules around cookie completion
This commit adds documentation to clarify the ordering rules for DMA cookie completion, ensuring buffers are flushed before drivers invoke the completion.
Documentation/driver-api/dmaengine/provider.rst dma_cookie_t · line 561
Quoted 12 lines
Documentation/driver-api/dmaengine/provider.rst +4
-0@@ -555,6 +555,11 @@ dma_cookie_t - Not really relevant any more since the introduction of ``virt-dma`` that abstracts it away. +- dmaengine drivers need to ensure buffers are flushed before invoking + vchan_cookie_complete() or dma_cookie_complete(). This would imply a call + to unmapping buffers or any such architcure calls to ensure caller seeing + buffers are flushed is done before invoking these calls.
[Severity: Low]
This isn't a bug, but there is a typo here ('architcure' instead of 'architecture'), and the phrasing "to ensure caller seeing buffers are flushed is done before invoking these calls" is grammatically awkward.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 8 lines · Vinod Koul
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
Signed-off-by Vinod Koul <[email protected]>
Quoted 8 lines · Vinod Koul
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
Signed-off-by Vinod Koul <[email protected]>
Quoted 20 lines
--- Documentation/driver-api/dmaengine/provider.rst | 5 +++++ 1 file changed, 5 insertions(+)Documentation/driver-api/dmaengine/provider.rst +5
-0@@ -557,6 +557,11 @@ dma_cookie_t - Not really relevant any more since the introduction of ``virt-dma`` that abstracts it away. +- dmaengine drivers need to ensure buffers are flushed before invoking + vchan_cookie_complete() or dma_cookie_complete(). This would imply a call + to unmapping buffers or any such architcure calls to ensure caller seeing + buffers are flushed is done before invoking these calls. + dma_vec - A small structure that contains a DMA address and length.
Quoted 17 lines · Vinod Koul
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
Signed-off-by Vinod Koul <[email protected]>--- Documentation/driver-api/dmaengine/provider.rst | 5 +++++ 1 file changed, 5 insertions(+)Documentation/driver-api/dmaengine/provider.rst +0
-0
Documentation/driver-api/dmaengine/provider.rst dma_cookie_t · line 562
Quoted 6 lines
Documentation/driver-api/dmaengine/provider.rst +3
-0@@ -557,6 +557,11 @@ dma_cookie_t - Not really relevant any more since the introduction of ``virt-dma`` that abstracts it away. +- dmaengine drivers need to ensure buffers are flushed before invoking + vchan_cookie_complete() or dma_cookie_complete(). This would imply a call + to unmapping buffers or any such architcure calls to ensure caller seeing
Sashiko report a typo architcure
Quoted 8 lines
Documentation/driver-api/dmaengine/provider.rst +2
-1+ buffers are flushed is done before invoking these calls. + dma_vec - A small structure that contains a DMA address and length. --2.53.0
Vinod Koul
maintainerQuoted 21 lines · Frank Li
Quoted 20 lines · Vinod Koul
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
Signed-off-by Vinod Koul <[email protected]>--- Documentation/driver-api/dmaengine/provider.rst | 5 +++++ 1 file changed, 5 insertions(+)Documentation/driver-api/dmaengine/provider.rst +0
-0@@ -557,6 +557,11 @@ dma_cookie_t - Not really relevant any more since the introduction of ``virt-dma`` that abstracts it away.
Quoted 5 lines
Documentation/driver-api/dmaengine/provider.rst dma_cookie_t · line 562
Quoted 3 lines
Documentation/driver-api/dmaengine/provider.rst +3
-0+- dmaengine drivers need to ensure buffers are flushed before invoking + vchan_cookie_complete() or dma_cookie_complete(). This would imply a call + to unmapping buffers or any such architcure calls to ensure caller seeingSashiko report a typo architcure
Yeah looks like my spell checker didnt caught it, I will apply now with that fixed
Quoted 11 lines
Reviewed-by Frank Li <[email protected]>Quoted 8 lines
Documentation/driver-api/dmaengine/provider.rst +2
-1+ buffers are flushed is done before invoking these calls. + dma_vec - A small structure that contains a DMA address and length. --2.53.0
Signature · 1 line
~Vinod
Quoted 8 lines · Vinod Koul
Sashiko pointed in [1] about the cookie completion order. It is good to Document that for ensuring that dma buffer is flushed and no stale data is seeing by consumer, we need to make sure such action is taken before drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/[email protected]
[...]
Applied, thanks!
[1/1] docs: dmaengine: clarify ordering rules around cookie completion
commit: fa89be96e845de705eed6edd01ecb79d46ee21c7
Best regards,
Signature · 1 line
~Vinod