CV-Bowen opened a new pull request, #22363:
URL: https://github.com/apache/nuttx/pull/22363
## Summary
Run the client endpoints of regulator_rpmsg and reset_rpmsg at
`RPMSG_PRIO_RT`. reset_rpmsg first needs two fixes, because no
configuration built it any more:
- `drivers/reset/reset_rpmsg: match the endpoint release callback type`:
the open-amp endpoint release callback lost its `priv` argument, but
`reset_rpmsg_server_ept_release()` kept it, so the file no longer
compiles:
```
drivers/reset/reset_rpmsg.c:728:26: error: assignment to
'rpmsg_ept_release_cb' {aka 'void (*)(struct rpmsg_endpoint *)'} from
incompatible pointer type 'void (*)(struct rpmsg_endpoint *, void *)'
```
- `drivers/reset: build reset_rpmsg.c with CMake`: Make.defs builds it
with `CONFIG_RESET_RPMSG`, CMake never did, so a CMake build with
`RESET_RPMSG` failed to link (`undefined reference to
'reset_rpmsg_server_init'`).
- `drivers/power/supply/regulator_rpmsg: run the client endpoint at
RPMSG_PRIO_RT` and `drivers/reset/reset_rpmsg: run the client endpoint
at RPMSG_PRIO_RT`: on the client side the endpoint only receives
replies; its callback (`regulator_rpmsg_ept_cb()` /
`reset_rpmsg_ept_cb()`) stores the result in the request's cookie and
posts the semaphore the caller waits on, which is safe in interrupt
context. The reply is then handled inline from the rx interrupt
instead of through the rpmsg work queue. The server endpoints, whose
handlers take mutexes and call the regulator/reset frameworks, keep
their default priority.
## Impact
- reset_rpmsg builds again (Make and CMake).
- Lower latency for regulator and reset calls over rpmsg; only the
client endpoint priority changes. No API or protocol 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
Every commit builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
qemu-armv8a:rpproxy with `REGULATOR`, `REGULATOR_RPMSG`, `RESET` and
`RESET_RPMSG` enabled with 0 warnings, except the first commit, which
still fails to link with CMake as master does (the second commit fixes
that).
Not tested at runtime: no in-tree board registers a regulator or reset
rpmsg client and server pair. imx93-qsb:rpmsg is unaffected (none of the
touched services is enabled there).
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]