You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jlaitine (via GitHub)" <gi...@apache.org> on 2025/07/01 12:27:32 UTC
[PR] imx9/lpuart: Fix race condition / regression in imx9_txint [nuttx]
jlaitine opened a new pull request, #16654:
URL: https://github.com/apache/nuttx/pull/16654
## Summary
Commit 83a119160 fixed SMP by removing call to uart_xmitchars from inside spinlock.
This only works for SMP, since uart_xmitchars has a lock only in SMP and the irq lock is ifdeffed away in a single-core system: https://github.com/apache/nuttx/blob/3d37e85b13fb57ae8f1b8f6917e5aaac918d0982/drivers/serial/serial_io.c#L61 .
Thus, in a single-core configuration the uart_xmitchars can now be called in parallel from the interrupt handler and from the imx9_txint.
Fix this by filling the uart buffers already before enabling the interrupt, this way it is not possible to get the function called in parallel for the same device.
## Impact
Fixes a regression in lpuart for single-core configuration, due to SMP enabling.
## Testing
Tested on a custom imx93 based device
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imx9/lpuart: Fix race condition / regression in imx9_txint [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #16654:
URL: https://github.com/apache/nuttx/pull/16654
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org