This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 07cff74ae3589ff01d76b41d3b74820f2fb77b24 Author: Bowen Wang <[email protected]> AuthorDate: Tue Nov 24 13:07:00 2026 +0800 openamp: export rpmsg_unregister_endpoint() Add a patch that exports rpmsg_unregister_endpoint(), so that a device being torn down can unregister its endpoints without sending NS_DESTROY, which can no longer reach the remote. Signed-off-by: Bowen Wang <[email protected]> --- ...30-rpmsg-export-rpmsg_unregister_endpoint.patch | 53 ++++++++++++++++++++++ openamp/open-amp.cmake | 2 + openamp/open-amp.defs | 1 + 3 files changed, 56 insertions(+) diff --git a/openamp/0030-rpmsg-export-rpmsg_unregister_endpoint.patch b/openamp/0030-rpmsg-export-rpmsg_unregister_endpoint.patch new file mode 100644 index 00000000000..05745dde9dd --- /dev/null +++ b/openamp/0030-rpmsg-export-rpmsg_unregister_endpoint.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Bowen Wang <[email protected]> +Date: Mon, 12 Oct 2026 21:50:49 +0800 +Subject: [PATCH] rpmsg: export rpmsg_unregister_endpoint() + +A device being torn down has to unregister its endpoints without +sending NS_DESTROY, which can no longer reach the remote. + +Signed-off-by: Bowen Wang <[email protected]> +--- + lib/rpmsg/rpmsg.c | 2 +- + lib/rpmsg/rpmsg_internal.h | 12 ++++++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/lib/rpmsg/rpmsg.c open-amp/lib/rpmsg/rpmsg.c +index 0c82897..76521fd 100644 +--- a/lib/rpmsg/rpmsg.c ++++ open-amp/lib/rpmsg/rpmsg.c +@@ -292,7 +292,7 @@ int rpmsg_set_priority(struct rpmsg_endpoint *ept, uint8_t priority) + return 0; + } + +-static void rpmsg_unregister_endpoint(struct rpmsg_endpoint *ept) ++void rpmsg_unregister_endpoint(struct rpmsg_endpoint *ept) + { + struct rpmsg_device *rdev = ept->rdev; + +diff --git a/lib/rpmsg/rpmsg_internal.h open-amp/lib/rpmsg/rpmsg_internal.h +index 686ef07..854e8a3 100644 +--- a/lib/rpmsg/rpmsg_internal.h ++++ open-amp/lib/rpmsg/rpmsg_internal.h +@@ -144,6 +144,18 @@ void rpmsg_register_endpoint(struct rpmsg_device *rdev, + rpmsg_ept_cb cb, + rpmsg_ns_unbind_cb ns_unbind_cb, void *priv); + ++/** ++ * @internal ++ * ++ * @brief Unregister an endpoint without notifying the remote ++ * ++ * For a device that is going away, where the remote can no longer be told. ++ * Clears ept->rdev, so a later rpmsg_destroy_ept() on it is a no-op. ++ * ++ * @param ept pointer to a registered rpmsg endpoint ++ */ ++void rpmsg_unregister_endpoint(struct rpmsg_endpoint *ept); ++ + static inline struct rpmsg_endpoint * + rpmsg_get_ept_from_addr(struct rpmsg_device *rdev, uint32_t addr) + { +-- +2.34.1 + diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake index 73627688716..388ae2b57bf 100644 --- a/openamp/open-amp.cmake +++ b/openamp/open-amp.cmake @@ -96,6 +96,8 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/open-amp) ${CMAKE_CURRENT_LIST_DIR}/0028-rpmsg-take-the-ns-endpoint-reference-just-once.patch && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} < ${CMAKE_CURRENT_LIST_DIR}/0029-rpmsg-let-a-reference-outlive-the-endpoint-s-registr.patch + && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} < + ${CMAKE_CURRENT_LIST_DIR}/0030-rpmsg-export-rpmsg_unregister_endpoint.patch DOWNLOAD_NO_PROGRESS true TIMEOUT 30) diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs index b7c37adfa84..0a184a409a7 100644 --- a/openamp/open-amp.defs +++ b/openamp/open-amp.defs @@ -96,6 +96,7 @@ open-amp.zip: $(Q) patch -p0 < 0027-rpmsg-extract-the-name-service-handling-into-a-commo.patch $(Q) patch -p0 < 0028-rpmsg-take-the-ns-endpoint-reference-just-once.patch $(Q) patch -p0 < 0029-rpmsg-let-a-reference-outlive-the-endpoint-s-registr.patch + $(Q) patch -p0 < 0030-rpmsg-export-rpmsg_unregister_endpoint.patch .openamp_headers: open-amp.zip else
