Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271566
b: refs/heads/master
c: 5e1b612
h: refs/heads/master
v: v3
  • Loading branch information
Ohad Ben-Cohen authored and Joerg Roedel committed Sep 5, 2011
1 parent 04aa5af commit 0e3af29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4550d415a2e1668822ebf3a12b481548756b4e3
refs/heads/master: 5e1b612cb16f446996398bd23b6cd59ea0206938
13 changes: 4 additions & 9 deletions trunk/drivers/iommu/omap-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,18 +1081,13 @@ static int omap_iommu_unmap(struct iommu_domain *domain, unsigned long da,
struct omap_iommu_domain *omap_domain = domain->priv;
struct omap_iommu *oiommu = omap_domain->iommu_dev;
struct device *dev = oiommu->dev;
size_t bytes = PAGE_SIZE << order;
size_t ret;
size_t unmap_size;

dev_dbg(dev, "unmapping da 0x%lx size 0x%x\n", da, bytes);
dev_dbg(dev, "unmapping da 0x%lx order %d\n", da, order);

ret = iopgtable_clear_entry(oiommu, da);
if (ret != bytes) {
dev_err(dev, "entry @ 0x%lx was %d; not %d\n", da, ret, bytes);
return -EINVAL;
}
unmap_size = iopgtable_clear_entry(oiommu, da);

return 0;
return unmap_size ? get_order(unmap_size) : -EINVAL;
}

static int
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/iommu/omap-iovmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static void unmap_iovm_area(struct iommu_domain *domain, struct omap_iommu *obj,
order = get_order(bytes);

err = iommu_unmap(domain, start, order);
if (err)
if (err < 0)
break;

dev_dbg(obj->dev, "%s: unmap %08x(%x) %08x\n",
Expand Down

0 comments on commit 0e3af29

Please sign in to comment.