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

Commit 38b9a919 authored by Chintan Pandya's avatar Chintan Pandya
Browse files

iommu: msm: Fix the tough checks in get_attr



Dynamic domains will never be _properly_ attached
to any CB. That means, we cannot get a hold on CB
given a dynamic domain. And that is fine. So, don't
restrict clients to get TTBR0 and CONTEXTIDR from
dynamic domain.

Change-Id: I9a28819d6ab1281e4dd1a5e870a773bbab37ec40
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
parent c025b09c
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1864,17 +1864,11 @@ static int msm_iommu_domain_get_attr(struct iommu_domain *domain,
		*((unsigned int *) data) = ctx_drvdata->num;
		break;
	case DOMAIN_ATTR_TTBR0:
		if (!ctx_drvdata)
			return -ENODEV;

		ttbr0 = get_full_ttbr0(priv);

		*((u64 *)data) = ttbr0;
		break;
	case DOMAIN_ATTR_CONTEXTIDR:
		if (!ctx_drvdata)
			return -ENODEV;

		if (IS_CB_FORMAT_LONG)
			ctxidr = priv->procid;
		else