aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJoerg Roedel <[email protected]>2008-07-25 14:57:58 +0200
committerIngo Molnar <[email protected]>2008-07-26 15:43:05 +0200
commit3bc9f79ee1ddc913be0a6d3592036683ef8a3148 (patch)
tree21f0dc5f5feb140d8566e22fa3c7ecac009e27f3 /include/linux
parent024e8ac04453b3525448c31ef39848cf675ba6db (diff)
iommu: add iommu_num_pages helper function
Calculating the number of pages from given address and length numbers is a task required in multiple IOMMU implementations. So implement this as a generic function into the IOMMU helper code. Signed-off-by: Joerg Roedel <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: FUJITA Tomonori <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iommu-helper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index c975caf75385..f8598f583944 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -8,3 +8,4 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
unsigned long align_mask);
extern void iommu_area_free(unsigned long *map, unsigned long start,
unsigned int nr);
+extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);