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 3805c5501dfbe08c26f8f073f130ca3199c75178
Author: Bowen Wang <[email protected]>
AuthorDate: Fri Nov 20 02:50:10 2026 +0800

    openamp: add the priority field to the rpmsg virtio config
    
    Add a patch that puts a priority byte into struct fw_rsc_config, taken
    from the reserved space so the structure keeps its size, and the
    feature bit VIRTIO_RPMSG_F_PRIORITY that tells the rpmsg virtio device
    to read it. The NuttX rpmsg virtio driver will use it to set the
    priority of its rx workers.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 ...o-add-priority-in-the-rpmsg-virtio-config.patch | 51 ++++++++++++++++++++++
 openamp/open-amp.cmake                             |  2 +
 openamp/open-amp.defs                              |  1 +
 3 files changed, 54 insertions(+)

diff --git 
a/openamp/0025-rpmsg_virtio-add-priority-in-the-rpmsg-virtio-config.patch 
b/openamp/0025-rpmsg_virtio-add-priority-in-the-rpmsg-virtio-config.patch
new file mode 100644
index 00000000000..dbceca7cd5b
--- /dev/null
+++ b/openamp/0025-rpmsg_virtio-add-priority-in-the-rpmsg-virtio-config.patch
@@ -0,0 +1,51 @@
+From b4b107c41b8b8e977e8cbc2213eb61c8646856be Mon Sep 17 00:00:00 2001
+From: Bowen Wang <[email protected]>
+Date: Wed, 19 Nov 2025 11:25:40 +0800
+Subject: [PATCH 0025/25] rpmsg_virtio: add priority in the rpmsg virtio config
+
+Add a priority byte to struct fw_rsc_config, taken from the reserved
+space so the structure keeps its size, and the feature bit
+VIRTIO_RPMSG_F_PRIORITY that tells the rpmsg virtio device to read it.
+The device can use it to set the priority of the threads that handle
+the rpmsg messages.
+
+Signed-off-by: Bowen Wang <[email protected]>
+---
+ lib/include/openamp/remoteproc.h   | 7 ++++++-
+ lib/include/openamp/rpmsg_virtio.h | 1 +
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/include/openamp/remoteproc.h 
open-amp/lib/include/openamp/remoteproc.h
+index 62ae76a380..9b2c1e4d7f 100644
+--- a/lib/include/openamp/remoteproc.h
++++ open-amp/lib/include/openamp/remoteproc.h
+@@ -386,9 +386,14 @@ struct fw_rsc_config {
+ 
+       uint8_t remote_cpuname[VIRTIO_RPMSG_CPUNAME_SIZE];
+ 
++      /** The rpmsg virtio device priority (if VIRTIO_RPMSG_F_PRIORITY) */
++
++      uint8_t priority;
++
+       /* Reserve for the future use */
+ 
+-      uint32_t reserved[6];
++      uint8_t reserved1[3];
++      uint32_t reserved2[5];
+ 
+       /** Put the customize config here */
+ } METAL_PACKED_END;
+diff --git a/lib/include/openamp/rpmsg_virtio.h 
open-amp/lib/include/openamp/rpmsg_virtio.h
+index 5eef8b7c6a..7d1a2f3b4c 100644
+--- a/lib/include/openamp/rpmsg_virtio.h
++++ open-amp/lib/include/openamp/rpmsg_virtio.h
+@@ -33,6 +33,7 @@ extern "C" {
+ #define VIRTIO_RPMSG_F_BUFSZ  2 /* RP supports get buffer size from config 
space */
+ #define VIRTIO_RPMSG_F_CPUNAME        3 /* RP supports get local and peer cpu 
name */
+ #define VIRTIO_RPMSG_F_BUFADDR        4 /* RP supports get buffer address 
from config space */
++#define VIRTIO_RPMSG_F_PRIORITY       5 /* RP supports get priority from 
config space */
+ 
+ #if defined(VIRTIO_USE_DCACHE)
+ #define BUFFER_FLUSH(x, s)            metal_cache_flush(x, s)
+-- 
+2.34.1
diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake
index 6266a6bf8c5..fb1454f02c5 100644
--- a/openamp/open-amp.cmake
+++ b/openamp/open-amp.cmake
@@ -86,6 +86,8 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/open-amp)
       
${CMAKE_CURRENT_LIST_DIR}/0023-rpmsg_virtio-let-the-caller-provide-the-virtqueue-ca.patch
       && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} <
       
${CMAKE_CURRENT_LIST_DIR}/0024-virtio-restore-the-virtio_dev_name-declaration.patch
+      && patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} <
+      
${CMAKE_CURRENT_LIST_DIR}/0025-rpmsg_virtio-add-priority-in-the-rpmsg-virtio-config.patch
     DOWNLOAD_NO_PROGRESS true
     TIMEOUT 30)
 
diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs
index 9fd86a181e0..37ace37b986 100644
--- a/openamp/open-amp.defs
+++ b/openamp/open-amp.defs
@@ -90,6 +90,7 @@ open-amp.zip:
        $(Q) patch -p0 < 0022-rpmsg_virtio-export-the-rx-buffer-helpers.patch
        $(Q) patch -p0 < 
0023-rpmsg_virtio-let-the-caller-provide-the-virtqueue-ca.patch
        $(Q) patch -p0 < 
0024-virtio-restore-the-virtio_dev_name-declaration.patch
+       $(Q) patch -p0 < 
0025-rpmsg_virtio-add-priority-in-the-rpmsg-virtio-config.patch
 
 .openamp_headers: open-amp.zip
 else

Reply via email to