CV-Bowen opened a new pull request, #22393:
URL: https://github.com/apache/nuttx/pull/22393

   ## Summary
   
   Depends on apache/nuttx#22392; this branch is stacked on it (and on
   apache/nuttx#22391).
   
   - `drivers/serial/uart_rpmsg: rework into an rpmsg-pty character
     device`: the serial upper half is replaced by a small character device
     on the rpmsg endpoint (open/read/write/ioctl/poll). Received data goes
     into an SPSC ring (`<nuttx/ring.h>`) and the endpoint callback never
     sends; writes are framed straight from the caller's buffer. The
     counter-based flow control, `uart_rpmsg_init()` and the wire format
     are unchanged. Kconfig: `RPMSG_UART` no longer selects the
     `SERIAL_*` options; new `RPMSG_UART_NPOLLWAITERS`. Adapted to the
     current tree: the ring calls use the current ring API (slave flag in
     `ring_spsc_init()`, no element size in `ring_spsc_dequeue_start()`),
     poll takes a `struct pollfd_s`, and `file_operations` has a truncate
     slot.
   - `use the shared termios helpers`: the private iflag/oflag copy and the
     SIGINT/SIGTSTP scan are replaced by the `uart_termios_*` helpers;
     signals now honour `ISIG`, so the console defaults to `ECHO | ISIG`.
   - `set up the terminal with uart_termios_init()`: the uart_rpmsg part of
     2f890e5b0f2 ("drivers/serial: keep the c_cc settings in the termios
     helpers"), which master took without it.
   
   ## Impact
   
   - `/dev/tty<name>` is now a plain character device rather than a serial
     upper-half device: `RPMSG_UART` no longer pulls in
     `SERIAL_RXDMA/TXDMA/REMOVABLE/IFLOWCONTROL`. Applications see the
     same read/write/termios/poll behaviour.
   - Ctrl-C on the console needs `ISIG`, which is now the default.
   - New Kconfig `RPMSG_UART_NPOLLWAITERS` (default 2).
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU 
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
   
   Every commit builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
   qemu-armv8a:rpproxy with 0 warnings.
   
   The new device is exercised by `cu /dev/ttyproxy` on sim:rpserver
   (open, `tcgetattr`/`tcsetattr`, read, write, poll) to reach the proxy's
   nsh: the fixed rpmsg cases run through it, plus 15 rounds of
   `ls -l /proc` and `cat /proc/meminfo` on the proxy, each followed by
   `rpmsg ping all 5 512 1 0` on the server: 45/45.
   
   No regression in rpmsg: sim:rpserver/rpproxy and 
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, 
rpmsgfs; 15/15; the sim proxy cases run over `/dev/ttyproxy`). qemu-armv8a was 
built with LIBC_ENVPATH and BINFMT_CHECKEXEC disabled, which current master 
needs for nxinit to start nsh there; unrelated to this change.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] drivers/serial/uart_rpms... CV-Bowen (via GitHub) via commits

Reply via email to