diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-02 13:32:34 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-09-05 09:15:14 -0400 |
commit | 9e28547f887c3040747d8422e1feef79bea93bd8 (patch) | |
tree | fd00d3147a680c645dd31b73282acbe4efe23766 /drivers | |
parent | c6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff) |
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: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
Cc: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/msm_iommu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 1a584e077c61..d1733f672f16 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c | |||
@@ -543,6 +543,13 @@ static int msm_iommu_unmap(struct iommu_domain *domain, unsigned long va, | |||
543 | } | 543 | } |
544 | 544 | ||
545 | ret = __flush_iotlb(domain); | 545 | ret = __flush_iotlb(domain); |
546 | |||
547 | /* | ||
548 | * the IOMMU API requires us to return the order of the unmapped | ||
549 | * page (on success). | ||
550 | */ | ||
551 | if (!ret) | ||
552 | ret = order; | ||
546 | fail: | 553 | fail: |
547 | spin_unlock_irqrestore(&msm_iommu_lock, flags); | 554 | spin_unlock_irqrestore(&msm_iommu_lock, flags); |
548 | return ret; | 555 | return ret; |