Skip to contentSkip to conversation

arm-bsp/kernel: Fix TEE driver bug for corstone1000

PATCH Applied [email protected] 2 participants 3 messages Oct 14, 2022

lore
Share & tools
lore
#0 lore raw

cover arm-bsp/kernel: Fix TEE driver bug for corstone1000

From: Emekcan <[email protected]>

Fixes the Tee driver bug in corstone1000. It adds a delay to fix a possible race-condition occurs during FF-A calls. This is a temporary fix for the upcoming release.

Emekcan Aras (1):
arm-bsp/kernel: Fix TEE driver bug for corstone1000

 ...dds-workaround-for-cs1k-specific-bug.patch | 41 +++++++++++++++++++
 .../linux/linux-arm-platforms.inc             |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/corstone1000/0006-Adds-workaround-for-cs1k-specific-bug.patch
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 arm-bsp/kernel: Fix TEE driver bug for corstone1000

From: Emekcan <[email protected]>

Fixes the Tee driver bug in corstone1000. It adds a delay to fix a possible race-condition occurs during FF-A calls. This is a temporary fix for the upcoming release.

---
 ...dds-workaround-for-cs1k-specific-bug.patch | 41 +++++++++++++++++++
 .../linux/linux-arm-platforms.inc             |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/corstone1000/0006-Adds-workaround-for-cs1k-specific-bug.patch
meta-arm-bsp/recipes-kernel/linux/files/corstone1000/0006-Adds-workaround-for-cs1k-specific-bug.patch new file +41 -0
new file mode 100644
index 00000000..5cd8e4b0
@@ -0,0 +1,41 @@
+Upstream-Status: Inappropriate[Temporary bugfix]
+Signed-off-by: Emekcan Aras <[email protected]>
+
+From f1a869ea986305a6fb20f3c770c11778a898b86d Mon Sep 17 00:00:00 2001
+From: Emekcan <[email protected]>
+Date: Thu, 13 Oct 2022 20:53:42 +0100
+Subject: [PATCH] Adds workaround for cs1k specific bug
+
+Adds a temporary workaround to solve a possible
+race-conditioning issue in the tee driver
+for corstone1000.
+
+Signed-off-by: Emekcan Aras <[email protected]>
+---
+ drivers/firmware/arm_ffa/driver.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
+index ec731e9e942b..2a3ef649935e 100644
+--- a/drivers/firmware/arm_ffa/driver.c
++++ b/drivers/firmware/arm_ffa/driver.c
+@@ -32,6 +32,7 @@
+ #include <linux/scatterlist.h>
+ #include <linux/slab.h>
+ #include <linux/uuid.h>
++#include <linux/delay.h>
+ 
+ #include "common.h"
+ 
+@@ -344,7 +345,7 @@ static int ffa_msg_send_direct_req(u16 src_id, u16 dst_id, bool mode_32bit,
+ {
+ 	u32 req_id, resp_id, src_dst_ids = PACK_TARGET_INFO(src_id, dst_id);
+ 	ffa_value_t ret;
+-
++	msleep(1);
+ 	if (mode_32bit) {
+ 		req_id = FFA_MSG_SEND_DIRECT_REQ;
+ 		resp_id = FFA_MSG_SEND_DIRECT_RESP;
+-- 
+2.17.1
+
meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc +1 -0
index d0740bcd..34a40907 100644
@@ -49,6 +49,7 @@ SRC_URI:append:corstone1000 = " \
            file://0003-Add-rpmsg-driver-for-corstone1000.patch \
            file://0004-rpmsg-arm-fix-return-value.patch \
            file://0005-rpmsg-arm-update-chrdev-to-ctrldev-registration.patch \
+           file://0006-Adds-workaround-for-cs1k-specific-bug.patch \
         "
 
 SRC_URI:append:corstone1000 = " ${@bb.utils.contains('MACHINE_FEATURES', \
Signature · 1 line
2.17.1
Applied
#2 lore raw
In reply to [email protected]
Quoted 9 lines · On Fri, 14 Oct 2022 13:12:29 +0100, [email protected] wrote:

Fixes the Tee driver bug in corstone1000. It adds a delay to fix a possible race-condition occurs during FF-A calls. This is a temporary fix for the upcoming release.

Emekcan Aras (1):
arm-bsp/kernel: Fix TEE driver bug for corstone1000

[...]

Applied, thanks!

[1/1] arm-bsp/kernel: Fix TEE driver bug for corstone1000

      commit: 13199c55c013c6f303258bf9a32d289211fe6a5c

Best regards,

Signature · 1 line
Jon Mason <[email protected]>