From 98a9762e2ab61a4d49978bbe6340ef0eeff679d7 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 21 Nov 2022 11:12:33 +0800 Subject: [PATCH] rptun: fix rptun don't wait issue when get tx patyload Signed-off-by: Xiang Xiao --- ...wledge-the-received-creation-message.patch | 2 +- ...e-individual-buffer-size-dynamically.patch | 2 +- ...int-ready-in-rpmsg_send-and-rpmsg_se.patch | 2 +- ...namp-add-new-ops-notify_wait-support.patch | 2 +- ...-t-need-check-status-when-get_tx_pay.patch | 3 +- ...-user-when-the-remote-address-is-rec.patch | 2 +- ...uble-calling-ns_bound-when-each-othe.patch | 2 +- ...all-elf_-functions-static-except-elf.patch | 2 +- ...tion-of-vring_rsc-shadows-a-previous.patch | 13 +++++++-- ...don-t-wait-issue-when-get-tx-patyloa.patch | 28 +++++++++++++++++++ openamp/open-amp.defs | 1 + 11 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 openamp/0010-rptun-fix-rptun-don-t-wait-issue-when-get-tx-patyloa.patch diff --git a/openamp/0001-ns-acknowledge-the-received-creation-message.patch b/openamp/0001-ns-acknowledge-the-received-creation-message.patch index dcc31e7dbe1..1f7ebb421aa 100644 --- a/openamp/0001-ns-acknowledge-the-received-creation-message.patch +++ b/openamp/0001-ns-acknowledge-the-received-creation-message.patch @@ -1,7 +1,7 @@ From 1e43e60aa7ae118309cf256c50bd17f313540eba Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 7 Jan 2019 02:15:42 +0800 -Subject: [PATCH 1/9] ns: acknowledge the received creation message +Subject: [PATCH 01/10] ns: acknowledge the received creation message the two phase handsake make the client could initiate the transfer immediately without the server side send any dummy message first. diff --git a/openamp/0002-Negotiate-individual-buffer-size-dynamically.patch b/openamp/0002-Negotiate-individual-buffer-size-dynamically.patch index 71ee90cff2e..a309b31d436 100644 --- a/openamp/0002-Negotiate-individual-buffer-size-dynamically.patch +++ b/openamp/0002-Negotiate-individual-buffer-size-dynamically.patch @@ -1,7 +1,7 @@ From 285e4d359458ef09d397a41de04ada9a6b8d48e7 Mon Sep 17 00:00:00 2001 From: Chao An Date: Mon, 10 Dec 2018 16:26:39 +0800 -Subject: [PATCH 2/9] Negotiate individual buffer size dynamically +Subject: [PATCH 02/10] Negotiate individual buffer size dynamically If slave support VIRTIO_RPMSG_F_BUFSZ(0x04) feature, master determine the buffer size from config space(first 8 bytes), diff --git a/openamp/0003-rpmsg-wait-endpoint-ready-in-rpmsg_send-and-rpmsg_se.patch b/openamp/0003-rpmsg-wait-endpoint-ready-in-rpmsg_send-and-rpmsg_se.patch index 5fe242f565c..9bbcc089fdc 100644 --- a/openamp/0003-rpmsg-wait-endpoint-ready-in-rpmsg_send-and-rpmsg_se.patch +++ b/openamp/0003-rpmsg-wait-endpoint-ready-in-rpmsg_send-and-rpmsg_se.patch @@ -1,7 +1,7 @@ From 931cd95ab99550befa75703cc36d5e6f6964b63e Mon Sep 17 00:00:00 2001 From: Guiding Li Date: Wed, 20 Feb 2019 11:36:57 +0800 -Subject: [PATCH 3/9] rpmsg: wait endpoint ready in rpmsg_send and +Subject: [PATCH 03/10] rpmsg: wait endpoint ready in rpmsg_send and rpmsg_send_nocopy because the remote need time to return the destination address diff --git a/openamp/0004-openamp-add-new-ops-notify_wait-support.patch b/openamp/0004-openamp-add-new-ops-notify_wait-support.patch index d7e8735f658..c7b4c68ba42 100644 --- a/openamp/0004-openamp-add-new-ops-notify_wait-support.patch +++ b/openamp/0004-openamp-add-new-ops-notify_wait-support.patch @@ -1,7 +1,7 @@ From ddc209c9475a2822ffe5d18441bd01718acdbc11 Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 29 Jul 2022 22:57:23 +0800 -Subject: [PATCH 4/9] openamp: add new ops notify_wait() support +Subject: [PATCH 04/10] openamp: add new ops notify_wait() support This can avoid looping check tx buffer diff --git a/openamp/0005-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch b/openamp/0005-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch index 3cd7ae3b53e..3edd6d971db 100644 --- a/openamp/0005-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch +++ b/openamp/0005-rpmsg_virtio-don-t-need-check-status-when-get_tx_pay.patch @@ -1,7 +1,8 @@ From 5a9d63c1ce2878aa792c49a1205ebb73dbe6258f Mon Sep 17 00:00:00 2001 From: ligd Date: Mon, 28 Feb 2022 16:31:54 +0800 -Subject: [PATCH 5/9] rpmsg_virtio: don't need check status when get_tx_payload +Subject: [PATCH 05/10] rpmsg_virtio: don't need check status when + get_tx_payload VELAOS-21 diff --git a/openamp/0006-rpmsg-notify-the-user-when-the-remote-address-is-rec.patch b/openamp/0006-rpmsg-notify-the-user-when-the-remote-address-is-rec.patch index 79ddaecda4d..b7666e9b7f8 100644 --- a/openamp/0006-rpmsg-notify-the-user-when-the-remote-address-is-rec.patch +++ b/openamp/0006-rpmsg-notify-the-user-when-the-remote-address-is-rec.patch @@ -1,7 +1,7 @@ From a2c9d79f9b77f057d89ede1395559c0645169b7a Mon Sep 17 00:00:00 2001 From: ligd Date: Tue, 19 Oct 2021 19:45:14 +0800 -Subject: [PATCH 6/9] rpmsg: notify the user when the remote address is +Subject: [PATCH 06/10] rpmsg: notify the user when the remote address is received Change-Id: I2f0601fb38944e0cfb8888aa397740161b159e40 diff --git a/openamp/0007-openamp-avoid-double-calling-ns_bound-when-each-othe.patch b/openamp/0007-openamp-avoid-double-calling-ns_bound-when-each-othe.patch index 3831c94b35d..31a781f0a10 100644 --- a/openamp/0007-openamp-avoid-double-calling-ns_bound-when-each-othe.patch +++ b/openamp/0007-openamp-avoid-double-calling-ns_bound-when-each-othe.patch @@ -1,7 +1,7 @@ From 0e77783658066c02903cc6693460f3bb577e3030 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Mon, 11 Apr 2022 13:31:35 +0800 -Subject: [PATCH 7/9] openamp: avoid double calling ns_bound when each other +Subject: [PATCH 07/10] openamp: avoid double calling ns_bound when each other calls create_ept VELAPLATFO-1522 diff --git a/openamp/0008-remoteproc-make-all-elf_-functions-static-except-elf.patch b/openamp/0008-remoteproc-make-all-elf_-functions-static-except-elf.patch index 8bb09a716dd..fb5e9d5e11f 100644 --- a/openamp/0008-remoteproc-make-all-elf_-functions-static-except-elf.patch +++ b/openamp/0008-remoteproc-make-all-elf_-functions-static-except-elf.patch @@ -1,7 +1,7 @@ From bcd10078fe4266cadbc437b130832dd90c00df33 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 15 Nov 2019 19:01:49 +0800 -Subject: [PATCH 8/9] remoteproc: make all elf_* functions static except +Subject: [PATCH 08/10] remoteproc: make all elf_* functions static except elf_identify it's the best practice to reduce the name scope as small as possible diff --git a/openamp/0009-Fix-warn-declaration-of-vring_rsc-shadows-a-previous.patch b/openamp/0009-Fix-warn-declaration-of-vring_rsc-shadows-a-previous.patch index caa360fcc17..853565f0de4 100644 --- a/openamp/0009-Fix-warn-declaration-of-vring_rsc-shadows-a-previous.patch +++ b/openamp/0009-Fix-warn-declaration-of-vring_rsc-shadows-a-previous.patch @@ -1,9 +1,18 @@ -From 3af4aed5e9f7d0299ded056adcdd1259fc44f64c Mon Sep 17 00:00:00 2001 +From e33b3fa0b6f111b54648f682102266b077a0c285 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 6 Nov 2022 00:51:35 +0800 -Subject: [PATCH 9/9] Fix warn: declaration of 'vring_rsc' shadows a previous +Subject: [PATCH 09/10] Fix warn: declaration of 'vring_rsc' shadows a previous local +regressed by commit 03c80a13417f67f94852cf7d5cb160f1bdf8271e +Author: Tammy Leino +Date: Mon Sep 26 08:14:35 2022 -0700 + + handle_vdev_rsc must return error if notifyid cannot be assigned + + Updated handle_vdev_rsc to return error if a unique id cannot be assigned + Signed-off-by: Tammy Leino + Signed-off-by: Xiang Xiao --- lib/remoteproc/rsc_table_parser.c | 2 -- diff --git a/openamp/0010-rptun-fix-rptun-don-t-wait-issue-when-get-tx-patyloa.patch b/openamp/0010-rptun-fix-rptun-don-t-wait-issue-when-get-tx-patyloa.patch new file mode 100644 index 00000000000..99768f79e3b --- /dev/null +++ b/openamp/0010-rptun-fix-rptun-don-t-wait-issue-when-get-tx-patyloa.patch @@ -0,0 +1,28 @@ +From 160e7ee44228668074347226e9c0d9068c480d98 Mon Sep 17 00:00:00 2001 +From: Jiuzhu Dong +Date: Thu, 11 Aug 2022 21:54:53 +0800 +Subject: [PATCH 10/10] rptun: fix rptun don't wait issue when get tx patyload + buffer + +Signed-off-by: Jiuzhu Dong +Signed-off-by: ligd +--- + lib/rpmsg/rpmsg_virtio.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/lib/rpmsg/rpmsg_virtio.c open-amp/lib/rpmsg/rpmsg_virtio.c +index 49817799..06c6890b 100644 +--- a/lib/rpmsg/rpmsg_virtio.c ++++ open-amp/lib/rpmsg/rpmsg_virtio.c +@@ -372,8 +372,6 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev, + status = rpmsg_virtio_notify_wait(rvdev, rvdev->rvq); + if (status == RPMSG_SUCCESS) + continue; +- else if (status != RPMSG_ERR_NXIO) +- break; + + metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL); + tick_count--; +-- +2.25.1 + diff --git a/openamp/open-amp.defs b/openamp/open-amp.defs index fa65b60f604..446e21a6cb0 100644 --- a/openamp/open-amp.defs +++ b/openamp/open-amp.defs @@ -44,6 +44,7 @@ ifeq ($(wildcard open-amp/.git),) $(Q) patch -p0 < 0007-openamp-avoid-double-calling-ns_bound-when-each-othe.patch $(Q) patch -p0 < 0008-remoteproc-make-all-elf_-functions-static-except-elf.patch $(Q) patch -p0 < 0009-Fix-warn-declaration-of-vring_rsc-shadows-a-previous.patch + $(Q) patch -p0 < 0010-rptun-fix-rptun-don-t-wait-issue-when-get-tx-patyloa.patch endif .openamp_headers: open-amp.zip