CV-Bowen opened a new pull request, #21723:
URL: https://github.com/apache/nuttx/pull/21723
## Summary
rptun keeps its instances on a libmetal list and uses libmetal's
`metal_container_of()` and `metal_log()`. rptun is a NuttX driver, so
use the NuttX equivalents, then make the instance list a `dq_queue_t`,
which is empty when zeroed and needs no initializer.
- drivers/rptun: use the nuttx list and container_of instead of metal
- drivers/rptun: change the rptun list to a dq_queue
The list of vdevs inside `struct remoteproc` is owned by open-amp and
stays a `metal_list`.
## Impact
Internal to drivers/rptun/rptun.c. No API, ABI or Kconfig change.
## 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 instance list is walked by `rptun_ioctl_foreach()`, which serves
`rptun_boot()`/`rptun_poweroff()`/`rptun_reset()` and the reboot and
panic notifiers. sim:rpserver + sim:rpproxy, gdb on the server with a
breakpoint on `rptun_do_ioctl`, `poweroff` typed in the server nsh once
the proxy is up. Same result on both trees: the reboot notifier finds
the proxy instance and sends RPTUNIOC_STOP (0x5002).
<details><summary>master</summary>
```
HIT rptun_do_ioctl cmd=0x5002 cpu=proxy
HIT rptun_do_ioctl cmd=0x5002 cpu=proxy
[Inferior 1 (process 3602940) exited normally]
```
</details>
<details><summary>this PR</summary>
```
HIT rptun_do_ioctl cmd=0x5002 cpu=proxy
HIT rptun_do_ioctl cmd=0x5002 cpu=proxy
[Inferior 1 (process 3603421) exited normally]
```
</details>
rpmsg baseline:
- 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)
No regression in rpmsg: sim:rpserver/rpproxy and
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping,
rpmsgfs; 15/15). 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]