diff options
author | Jesse Barnes <jbarnes@hobbes.lan> | 2008-07-29 01:31:10 +0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-07-29 01:31:10 +0400 |
commit | 29111f579f4f3f2a07385f931854ab0527ae7ea5 (patch) | |
tree | 0271f20b0c954fa364be8627e0d6065544de0534 /lib | |
parent | cc5499c3a607a392e8a7adb934aaf14b2c6a3519 (diff) | |
parent | 87e39ea5714dd59ba31e36c25833d2b20255a29d (diff) | |
download | linux-29111f579f4f3f2a07385f931854ab0527ae7ea5.tar.xz |
Merge branch 'x86/iommu' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into for-linus
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) } } 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); |