nuttx/arch/arm64/src
Jukka Laitinen d8deca6c52 arch/arm/imx9, arch/arm64/imx9: Release eDMA lock before callbacks
Fix a potential deadlock in the DMA driver. DMA completion callbacks
may immediately submit another transfer, for example:

imx9_dmaterminate()
  -> imx9_dma_txcallback()
    -> imx9_dma_txavailable()
      -> uart_xmitchars_dma()
        -> imx9_dma_send()
          -> imx9_dmach_stop()
	    -> imx9_dmaterminate()

Resulting dmaterminate to take the same spinlock again. Fix this by moving
the spin_unlock_irqrestore_nopreempt before calling the callback. It is not
necessary to keep dma channel locked during the callback; the channel is
already free at this point.

This doesn't directly affect arch/arm/imx9 (the cortex-m version) because
it is not SMP (the spinlock is reduced to blocking irqs), but it is worth
fixing at the same to keep drivers in sync.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-09-15 08:41:58 -03:00
..
a64 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
a527 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
am62x arm64/am62x: Add TISCI client, GPIO and I2C drivers 2026-08-02 11:40:13 +08:00
bcm2711 arm64/bcm2711/pwm: Fix PWM defconfigs 2026-07-28 02:46:42 +08:00
cmake cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
common fs/hostfs: fix pre-existing nxstyle issues in touched files 2026-08-28 18:35:37 +08:00
fvp-v8r include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
goldfish include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
imx8 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
imx9 arch/arm/imx9, arch/arm64/imx9: Release eDMA lock before callbacks 2026-09-15 08:41:58 -03:00
qemu include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
rk3399 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
rk3588 arm64: add RK3588 support 2026-07-20 20:55:52 -03:00
zynq-mpsoc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
.gitignore
CMakeLists.txt arch: fix arch_interface guard for kernel builds 2026-08-06 02:39:03 +08:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
Toolchain.defs arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00