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

   ## Summary
   
   The rpmsg framework keeps its device, callback and bind lists with the
   libmetal list API, recovers containing structures with
   `metal_container_of()`, and the transports print their dumps with
   `metal_log()`. These are NuttX drivers, so use the NuttX equivalents:
   `struct list_node` with `list_for_every_entry()` and friends,
   `container_of()` from `nuttx/nuttx.h`, and `syslog(LOG_EMERG, ...)`.
   
   The global lists become statically initialised `struct list_node`s, so
   they need no init call.
   
   What stays on libmetal: `rdev->endpoints` and `rdev->lock` belong to
   open-amp's `struct rpmsg_device`, and rpmsg_virtio's private rx node
   lists are left as they are; only the code that rpmsg owns is converted.
   
   rpmsg_port gets two small helpers, `rpmsg_port_from_rdev()` and
   `rpmsg_port_hdr_from_buf()`, for the casts it repeats.
   
   ## Impact
   
   Internal to drivers/rpmsg. No API, ABI or Kconfig change. The dump
   output is the same text, now through syslog.
   
   ## 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
   
   The converted lists are walked on every rpmsg device registration,
   callback registration and name-service bind, and the dumps run in
   `rpmsg dump all`; the rpmsg baseline exercises all of them on both
   transports (rptun ivshmem and rpmsg_port uart):
   
   - sim:rpserver + sim:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
     - [x] `rpmsg dump all` (proxy)
   - qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
   
   Build only: sim:rpserver with `CONFIG_RPMSG_ROUTER=y`, to compile
   rpmsg_router_edge.c (no in-tree configuration enables the router).
   0 warnings.
   
   No regression in rpmsg: sim:rpserver/rpproxy and 
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, 
rpmsgfs; 15/15). No regression in virtio: qemu-armv8a:netnsh boot and pass the 
fixed virtio cases (rng, blk on mmio and pci, net, 9p; 24/24). 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/rpmsg: use the n... CV-Bowen (via GitHub) via commits

Reply via email to