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

Commit 7c85e025 authored by Prudhvi Yarlagadda's avatar Prudhvi Yarlagadda Committed by Gerrit - the friendly Code Review server
Browse files

qcom-geni-se: Add IOMMU check in geni common driver



Add IOMMU check to prevent using IOMMU functionality
if it is not enabled.

Change-Id: Ib653779444be869a71886fdd438a20bbf6f6af20
Signed-off-by: default avatarPrudhvi Yarlagadda <pyarlaga@codeaurora.org>
parent cc7a8b2d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1329,6 +1329,10 @@ static int geni_se_iommu_map_and_attach(struct geni_se_device *geni_se_dev)
	int bypass = 1;
	struct device *cb_dev = geni_se_dev->cb_dev;

	/*Don't proceed if IOMMU node is disabled*/
	if (!iommu_present(&platform_bus_type))
		return 0;

	mutex_lock(&geni_se_dev->iommu_lock);
	if (likely(geni_se_dev->iommu_map)) {
		mutex_unlock(&geni_se_dev->iommu_lock);