Revert "fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)"
[linux-2.6/linux-2.6-openrd.git] / include / linux / iommu-helper.h
blob64d1b638745d63bc0ac7569427e583db3236a0cc
1 #ifndef _LINUX_IOMMU_HELPER_H
2 #define _LINUX_IOMMU_HELPER_H
4 static inline unsigned long iommu_device_max_index(unsigned long size,
5 unsigned long offset,
6 u64 dma_mask)
8 if (size + offset > dma_mask)
9 return dma_mask - offset + 1;
10 else
11 return size;
14 extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
15 unsigned long shift,
16 unsigned long boundary_size);
17 extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
18 unsigned long start, unsigned int nr,
19 unsigned long shift,
20 unsigned long boundary_size,
21 unsigned long align_mask);
23 extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len,
24 unsigned long io_page_size);
26 #endif