Lines Matching refs:index
44 #define dvma_entry_paddr(index) (iommu_pte[index] & IOMMU_ADDR_MASK) argument
45 #define dvma_entry_vaddr(index,paddr) ((index << DVMA_PAGE_SHIFT) | \ argument
48 #define dvma_entry_set(index,addr) (iommu_pte[index] = \
52 #define dvma_entry_set(index,addr) (iommu_pte[index] = \ argument
56 #define dvma_entry_clr(index) (iommu_pte[index] = IOMMU_DT_INVALID) argument
66 unsigned long index; in dvma_print() local
68 index = dvma_addr >> DVMA_PAGE_SHIFT; in dvma_print()
70 pr_info("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr, in dvma_print()
71 dvma_entry_paddr(index)); in dvma_print()
148 unsigned long end, index; in dvma_map_iommu() local
150 index = baddr >> DVMA_PAGE_SHIFT; in dvma_map_iommu()
156 for(; index < end ; index++) { in dvma_map_iommu()
162 dvma_entry_set(index, __pa(kaddr)); in dvma_map_iommu()
164 iommu_pte[index] |= IOMMU_FULL_BLOCK; in dvma_map_iommu()
171 for(index = (baddr >> DVMA_PAGE_SHIFT); index < end; index++) in dvma_map_iommu()
172 dvma_print(index << DVMA_PAGE_SHIFT); in dvma_map_iommu()
181 int index, end; in dvma_unmap_iommu() local
184 index = baddr >> DVMA_PAGE_SHIFT; in dvma_unmap_iommu()
187 for(; index < end ; index++) { in dvma_unmap_iommu()
189 index << DVMA_PAGE_SHIFT); in dvma_unmap_iommu()
191 if(!dvma_entry_use(index)) in dvma_unmap_iommu()
193 index); in dvma_unmap_iommu()
195 dvma_entry_dec(index); in dvma_unmap_iommu()
197 dvma_entry_clr(index); in dvma_unmap_iommu()