Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ec2c754 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: lmh_lite: Add memory barrier before reading data from trustzone"

parents 26463157 a10bbc96
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ static void lmh_read_and_update(struct lmh_driver_data *lmh_dat)
	else
		ret = scm_call2(SCM_SIP_FNID(SCM_SVC_LMH,
			LMH_GET_INTENSITY), &desc_arg);
	/* Have memory barrier before we access the TZ data */
	mb();
	if (ret) {
		pr_err("Error in SCM v%d read call. err:%d\n",
				(is_scm_armv8()) ? 8 : 7, ret);
@@ -526,6 +528,8 @@ static int lmh_get_sensor_list(void)
		else
			ret = scm_call2(SCM_SIP_FNID(SCM_SVC_LMH,
				LMH_GET_SENSORS), &desc_arg);
		/* Have memory barrier before we access the TZ data */
		mb();
		if (ret < 0) {
			pr_err("Error in SCM v%d call. err:%d\n",
					(is_scm_armv8()) ? 8 : 7, ret);
@@ -661,6 +665,8 @@ static int lmh_get_dev_info(void)
				LMH_GET_PROFILES), &desc_arg);
			size = desc_arg.ret[0];
		}
		/* Have memory barrier before we access the TZ data */
		mb();
		if (ret) {
			pr_err("Error in SCM v%d get Profile call. err:%d\n",
					(is_scm_armv8()) ? 8 : 7, ret);