From 78c42d545ea8adeaa0478b30b0286c958f89ba41 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Tue, 29 Jan 2013 13:41:09 +0100 Subject: [PATCH] --- yaml --- r: 358827 b: refs/heads/master c: 57886518a8cdd319a04f5ea06a5f7ffcb8a93120 h: refs/heads/master i: 358825: 8c2f8a00948052b3d8a7e78471321f3f97b9754d 358823: 2d9662a96da71de2a579bede70cf85ce7ddff432 v: v3 --- [refs] | 2 +- trunk/drivers/iommu/iommu.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2bb93e3a9926..402d7f232851 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8b8a88a9e3042d41326c854272c881664acba1c +refs/heads/master: 57886518a8cdd319a04f5ea06a5f7ffcb8a93120 diff --git a/trunk/drivers/iommu/iommu.c b/trunk/drivers/iommu/iommu.c index 1065a1a19478..4e6d6f857e6f 100644 --- a/trunk/drivers/iommu/iommu.c +++ b/trunk/drivers/iommu/iommu.c @@ -734,7 +734,8 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, size_t orig_size = size; int ret = 0; - if (unlikely(domain->ops->map == NULL)) + if (unlikely(domain->ops->unmap == NULL || + domain->ops->pgsize_bitmap == 0UL)) return -ENODEV; /* find out the minimum page size supported */ @@ -808,7 +809,8 @@ size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size) size_t unmapped_page, unmapped = 0; unsigned int min_pagesz; - if (unlikely(domain->ops->unmap == NULL)) + if (unlikely(domain->ops->unmap == NULL || + domain->ops->pgsize_bitmap == 0UL)) return -ENODEV; /* find out the minimum page size supported */