Commit 89a8567
dmaengine: sh: rz-dmac: Move CHCTRL updates under spinlock
Both rz_dmac_disable_hw() and rz_dmac_irq_handle_channel() update the
CHCTRL register. To avoid concurrency issues when configuring
functionalities exposed by this registers, take the virtual channel lock.
All other CHCTRL updates were already protected by the same lock.
Previously, rz_dmac_disable_hw() disabled and re-enabled local IRQs, before
accessing CHCTRL registers but this does not ensure race-free access.
Remove the local IRQ disable/enable code as well.
Fixes: 5000d37 ("dmaengine: sh: Add DMAC driver for RZ/G2L SoC")
Cc: [email protected]
Reviewed-by: Biju Das <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Signed-off-by: Claudiu Beznea <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent abb863e commit 89a8567
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
305 | 303 | | |
306 | | - | |
307 | 304 | | |
308 | 305 | | |
309 | 306 | | |
| |||
568 | 565 | | |
569 | 566 | | |
570 | 567 | | |
571 | | - | |
572 | 568 | | |
| 569 | + | |
573 | 570 | | |
574 | 571 | | |
575 | 572 | | |
| |||
706 | 703 | | |
707 | 704 | | |
708 | 705 | | |
709 | | - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
710 | 709 | | |
711 | 710 | | |
712 | 711 | | |
| |||
0 commit comments