diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-07-25 08:57:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 09:43:05 -0400 |
commit | 3bc9f79ee1ddc913be0a6d3592036683ef8a3148 (patch) | |
tree | 21f0dc5f5feb140d8566e22fa3c7ecac009e27f3 /include/linux/iommu-helper.h | |
parent | 024e8ac04453b3525448c31ef39848cf675ba6db (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 <joerg.roedel@amd.com>
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: robert.richter@amd.com
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/iommu-helper.h')
-rw-r--r-- | include/linux/iommu-helper.h | 1 |
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, | |||
8 | unsigned long align_mask); | 8 | unsigned long align_mask); |
9 | extern void iommu_area_free(unsigned long *map, unsigned long start, | 9 | extern void iommu_area_free(unsigned long *map, unsigned long start, |
10 | unsigned int nr); | 10 | unsigned int nr); |
11 | extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len); | ||