summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaochen <zhaochen@codeaurora.org>2018-08-17 15:32:37 +0800
committerMichael Bestas <mkbestas@lineageos.org>2020-09-19 12:54:39 +0300
commita638073161e90ac6dc0ffc2e27cbc4bcd3ff88c3 (patch)
tree2f5b0f7f37eccf6fcf0603c2e0a916eb97c46bea
parent250f46158452aac57109fd256ccd675f87c6c07a (diff)
msm: adsprpc: Add secure flag to justice if use secure_domain or not
Reslove the problem of kernel log print continuous when do not use secure_domain feature in fastrpc. Change-Id: I3f0c13ea104b21670a5639bb13ebfd07a5ec59a6 Signed-off-by: zhaochen <zhaochen@codeaurora.org> Signed-off-by: Arian <arian.kulmer@web.de>
-rw-r--r--drivers/char/adsprpc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index f2be7f119e8c..f427be48cfdf 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -274,6 +274,7 @@ struct fastrpc_apps {
struct ion_client *client;
struct device *dev;
bool glink;
+ bool secure_flag;
spinlock_t ctxlock;
struct smq_invoke_ctx *ctxtable[FASTRPC_CTX_MAX];
};
@@ -3092,7 +3093,8 @@ static int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info)
if (err)
goto bail;
/* Check to see if the device node is non-secure */
- if (fl->dev_minor == MINOR_NUM_DEV) {
+ if (fl->dev_minor == MINOR_NUM_DEV &&
+ fl->apps->secure_flag == true) {
/*
* For non secure device node check and make sure that
* the channel allows non-secure access
@@ -3575,10 +3577,13 @@ static int fastrpc_probe(struct platform_device *pdev)
VERIFY(err, !of_property_read_u32(dev->of_node,
"qcom,secure-domains",
&secure_domains));
- if (!err)
+ if (!err) {
+ me->secure_flag = true;
configure_secure_channels(secure_domains);
- else
+ } else {
+ me->secure_flag = false;
pr_info("adsprpc: unable to read the domain configuration from dts\n");
+ }
}
if (of_device_is_compatible(dev->of_node,
"qcom,msm-fastrpc-compute-cb"))
@@ -3662,6 +3667,7 @@ static int __init fastrpc_device_init(void)
memset(me, 0, sizeof(*me));
fastrpc_init(me);
me->dev = NULL;
+ me->secure_flag = false;
VERIFY(err, 0 == platform_driver_register(&fastrpc_driver));
if (err)
goto register_bail;