CV-Bowen opened a new pull request, #21401:
URL: https://github.com/apache/nuttx/pull/21401
## Summary
rptun no longer depends on rpmsg, but its ioctl commands still borrow
the rpmsg base through `_RPTUNIOC(nr) _RPMSGIOC(nr)`. Give rptun its
own base, `_RPTUNBASE` (0x5000), next to the other driver bases in
`include/nuttx/fs/ioctl.h`, and drop the aliases from `rptun.h`.
## Impact
The values of `RPTUNIOC_*` change (base 0x2b00 -> 0x5000); the command
numbers and names do not. Users that include `nuttx/rptun/rptun.h`
(nsh's `rptun` command, nxinit) only need a rebuild. No 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
sim:rpserver + sim:rpproxy with a test-only change (not in this PR)
that registers a second, never started rptun instance `idle` on the
server, so nsh's `rptun` command reaches the driver with the new
ioctl numbers:
```
server> ls /dev/rptun
/dev/rptun:
idle
proxy
server> rptun reset /dev/rptun/idle 1
server> rpmsg ping all 3 64 3 0
[ 23.130080] [server] ping times: 3
```
`rptun reset` returns without an error, so `RPTUNIOC_RESET` is
accepted by the driver, and the link to the proxy keeps working.
`rptun stop` followed by `rptun start` on the live proxy instance
asserts at `openamp/open-amp/lib/rpmsg/rpmsg_virtio.c:402` on current
master as well (3 of 3 runs on both), so it is not used here.
Baseline: 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]