diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-01-23 14:03:17 +0000 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-02-25 11:27:27 +0530 |
commit | 191bd1cad3535a30c2931dc1757e260afe03854b (patch) | |
tree | 2c5237475f045f78ac744db8ada45c9be9f46f84 /drivers/ptp | |
parent | 8592f2c81ebc494017d574fd8b731be44087a2e9 (diff) | |
download | linux-191bd1cad3535a30c2931dc1757e260afe03854b.tar.bz2 |
dmaengine: at_xdmac: Fix locking in tasklet
Tasklets run with all the interrupts enabled. This means that we should
replace all the (already present) spin_lock_irqsave() uses in the tasklet
with spin_lock_irq() to protect being interrupted by a IRQ which tries
to get the same lock (via calls to device_prep_dma_* for example).
spin_lock and spin_lock_bh in tasklets are not enough to protect from IRQs,
update these to spin_lock_irq().
at_xdmac_advance_work() can be called with all the interrupts enabled (when
called from tasklet), or with interrupts disabled (when called from
at_xdmac_issue_pending). Move the locking in the callers to be able to use
spin_lock_irq() and spin_lock_irqsave() for these cases.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Link: https://lore.kernel.org/r/20200123140237.125799-10-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/ptp')
0 files changed, 0 insertions, 0 deletions