nuttx/drivers/serial
Masayuki Ishikawa 3ccef09b4e drivers: serial: Remove an unnecessary critical section (cs) for SMP
Summary:
- I thought this cs is needed to avoid data corruption
- For example, while executing uart_xmitchar() in the interrupt
  handler on CPU0, an application running on CPU1 can call
  uart_putxmitchar() via write()->uart_write().
- In this case, taking xmit.sem in uart_write() will wait for CPU0
  to finish uart_xmitchar() because CPU0 has already taken a cs
  in uart_xmitchar() then nxsem_wait() on CPU0 takes a new cs
  inside (and release the cs when returning but it's OK)
- Then uart_write() on CPU1 disables UART TX, so uart_xmitchar()
  on CPU0 will not be called while executing uart_write() on CPU1.
- So this critical section in uart_putxmitchar() can be removed.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp, esp32-devkitc:smp

Reported-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-05 22:33:09 -05:00
..
Kconfig serial/uart/h4: add bt h4 uart serial driver 2021-05-31 09:50:54 -03:00
Kconfig-16550
Kconfig-lpuart
Kconfig-sci
Kconfig-uart
Kconfig-usart
Make.defs serial/uart/h4: add bt h4 uart serial driver 2021-05-31 09:50:54 -03:00
ptmx.c Ensure the kernel component don't call userspace API 2021-03-01 09:23:09 +09:00
pty.c fs: Make nx_vxxx and file_vxxx as internal functions 2021-01-12 17:08:22 +01:00
pty.h drivers: Author Gregory Nutt: update licenses to Apache 2021-03-04 18:32:27 -08:00
serial_dma.c drivers: update licenses to Apache 2021-05-31 02:58:08 -05:00
serial_io.c drivers: Author Gregory Nutt: update licenses to Apache 2021-03-04 18:32:27 -08:00
serial.c drivers: serial: Remove an unnecessary critical section (cs) for SMP 2021-06-05 22:33:09 -05:00
tcdrain.c drivers: Author Sebastien Lorquet: update licenses to Apache 2021-03-20 19:22:58 -07:00
uart_16550.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
uart_bth4.c serial/uart/h4: add bt h4 uart serial driver 2021-05-31 09:50:54 -03:00
uart_rpmsg.c Fix nxstyle warning 2020-08-22 17:37:21 -06:00