diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iommu-helper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c index a3b8d4c3f77a..889ddce2021e 100644 --- a/lib/iommu-helper.c +++ b/lib/iommu-helper.c | |||
@@ -80,3 +80,11 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr) | |||
80 | } | 80 | } |
81 | } | 81 | } |
82 | EXPORT_SYMBOL(iommu_area_free); | 82 | EXPORT_SYMBOL(iommu_area_free); |
83 | |||
84 | unsigned long iommu_num_pages(unsigned long addr, unsigned long len) | ||
85 | { | ||
86 | unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE); | ||
87 | |||
88 | return size >> PAGE_SHIFT; | ||
89 | } | ||
90 | EXPORT_SYMBOL(iommu_num_pages); | ||