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

Commit 9e28547f authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen Committed by Joerg Roedel
Browse files

iommu/msm: ->unmap() should return order of unmapped page



Users of the IOMMU API (kvm specifically) assume that iommu_unmap()
returns the order of the unmapped page (on success).

Fix msm_iommu_unmap() accordingly.

Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
Cc: David Brown <davidb@codeaurora.org>
Acked-by: default avatarDavid Brown <davidb@codeaurora.org>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent c6a389f1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -543,6 +543,13 @@ static int msm_iommu_unmap(struct iommu_domain *domain, unsigned long va,
	}

	ret = __flush_iotlb(domain);

	/*
	 * the IOMMU API requires us to return the order of the unmapped
	 * page (on success).
	 */
	if (!ret)
		ret = order;
fail:
	spin_unlock_irqrestore(&msm_iommu_lock, flags);
	return ret;