[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1632485951-13473-4-git-send-email-jeyr@codeaurora.org>
Date: Fri, 24 Sep 2021 17:49:10 +0530
From: Jeya R <jeyr@...eaurora.org>
To: linux-arm-msm@...r.kernel.org, srinivas.kandagatla@...aro.org
Cc: Jeya R <jeyr@...eaurora.org>, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, fastrpc.upstream@....qualcomm.com
Subject: [PATCH 3/4] misc: fastrpc: Set channel as secure
Set channel as secure based on domain ID and secure domain DT property.
All DSP domains other than CDSP are set as secure by default and for
CDSP domain, secure flag is set if property is added to DT file.
Signed-off-by: Jeya R <jeyr@...eaurora.org>
---
drivers/misc/fastrpc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 07c41a5..631713d 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -216,6 +216,7 @@ struct fastrpc_channel_ctx {
struct miscdevice miscdev;
struct miscdevice securedev;
struct kref refcount;
+ bool secure;
};
struct fastrpc_user {
@@ -1646,6 +1647,12 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
if (!data)
return -ENOMEM;
+ if (domain_id != CDSP_DOMAIN_ID)
+ data->secure = true;
+ else
+ data->secure = of_property_read_bool(rdev->of_node,
+ "qcom,secure-domain");
+
data->miscdev.minor = MISC_DYNAMIC_MINOR;
data->miscdev.name = devm_kasprintf(rdev, GFP_KERNEL, "fastrpc-%s",
domains[domain_id]);
--
2.7.4
Powered by blists - more mailing lists