Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190971
b: refs/heads/master
c: 6765178
h: refs/heads/master
i:
  190969: 2967456
  190967: d080794
v: v3
  • Loading branch information
Joerg Roedel committed Mar 7, 2010
1 parent 6655e05 commit 913f23b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cefc53c7f494240d4813c80154c7617452d1904d
refs/heads/master: 67651786948c360c3122b8a17cb1e59209d50880
6 changes: 6 additions & 0 deletions trunk/drivers/base/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,

BUG_ON((iova | paddr) & invalid_mask);

if (iommu_ops->map)
return iommu_ops->map(domain, iova, paddr, gfp_order, prot);

return iommu_ops->map_range(domain, iova, paddr, size, prot);
}
EXPORT_SYMBOL_GPL(iommu_map);
Expand All @@ -133,6 +136,9 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order)

BUG_ON(iova & invalid_mask);

if (iommu_ops->unmap)
return iommu_ops->unmap(domain, iova, gfp_order);

iommu_ops->unmap_range(domain, iova, size);

return gfp_order;
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ struct iommu_ops {
void (*domain_destroy)(struct iommu_domain *domain);
int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
int (*map)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, int gfp_order, int prot);
int (*unmap)(struct iommu_domain *domain, unsigned long iova,
int gfp_order);
int (*map_range)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);
void (*unmap_range)(struct iommu_domain *domain, unsigned long iova,
Expand Down

0 comments on commit 913f23b

Please sign in to comment.