3bc9f79ee1
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>
12 lines
538 B
C
12 lines
538 B
C
extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
|
|
unsigned long shift,
|
|
unsigned long boundary_size);
|
|
extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
|
|
unsigned long start, unsigned int nr,
|
|
unsigned long shift,
|
|
unsigned long boundary_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);
|