summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/0006-Adds-workaround-for-cs1k-specific-bug.patch
blob: 4fbeb23e5d22bc5ee65fa6978cb82d396b9b4a7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 555ac46f6f5157741a6fd8f21f74beb1340ed941 Mon Sep 17 00:00:00 2001
From: Emekcan <emekcan.aras@arm.com>
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.

Upstream-Status: Inappropriate
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
---
 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 2109cd178ff7..c15b3a83c720 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"
 
@@ -282,7 +283,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;