Thread (41 messages) 41 messages, 4 authors, 2021-07-13

RE: [PATCH v14 12/12] dmaengine: imx-sdma: add terminated list for freed descriptor in worker

From: Robin Gong <hidden>
Date: 2021-04-13 05:05:30
Also in: dmaengine, linux-devicetree, linux-spi, lkml

On 2021/04/12 17:39,  Vinod Koul [off-list ref]  wrote: 
On 07-04-21, 23:30, Robin Gong wrote:
quoted
Add terminated list for keeping descriptor so that it could be freed
in worker without any potential involving next descriptor raised up
before this descriptor freed, because vchan_get_all_descriptors get
all descriptors including the last terminated descriptor and the next
descriptor, hence, the next descriptor maybe freed unexpectly when
it's done in worker without this patch.
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
spinics.net%2Flists%2Fdmaengine%2Fmsg23367.html&amp;data=04%7C01%
7Cyib
quoted
in.gong%40nxp.com%7Cf255f329c8de459ffbaf08d8fd96d6c5%7C686ea1d3bc
2b4c6
quoted
fa92cd99c5c301635%7C0%7C0%7C637538171591949442%7CUnknown%7CT
WFpbGZsb3d
quoted
8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
D%7C
quoted
1000&amp;sdata=3YFgzHFDNwRnogvxZpNcwVKOKpk4GHrgScdrbuMKjwE%3D
&amp;rese
quoted
rved=0
Sound like you should implement .device_synchronize() and do the actual
work there..?
Yes,  I believe no issue here if call dmaengine_terminate_sync() always since
flush_work(&sdmac->terminate_worker) has already been in  .device_synchronize() of
sdma driver. But unfortunately, have to use dmaengine_terminate_all() instead in some
non-atomic case like ALSA.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help