]> err.no Git - linux-2.6/blobdiff - lib/iommu-helper.c
Merge commit 'v2.6.27-rc1' into x86/urgent
[linux-2.6] / lib / iommu-helper.c
index a3b8d4c3f77a5e7e466bd8f5e5591f3dcaa2c3bd..889ddce2021e26870b0b287ad0d28e7032e99028 100644 (file)
@@ -80,3 +80,11 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr)
        }
 }
 EXPORT_SYMBOL(iommu_area_free);
+
+unsigned long iommu_num_pages(unsigned long addr, unsigned long len)
+{
+       unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE);
+
+       return size >> PAGE_SHIFT;
+}
+EXPORT_SYMBOL(iommu_num_pages);