Lines Matching refs:index
45 #define dvma_entry_paddr(index) (iommu_pte[index] & IOMMU_ADDR_MASK) argument
46 #define dvma_entry_vaddr(index,paddr) ((index << DVMA_PAGE_SHIFT) | \ argument
49 #define dvma_entry_set(index,addr) (iommu_pte[index] = \
53 #define dvma_entry_set(index,addr) (iommu_pte[index] = \ argument
57 #define dvma_entry_clr(index) (iommu_pte[index] = IOMMU_DT_INVALID) argument
69 unsigned long index; in dvma_print() local
71 index = dvma_addr >> DVMA_PAGE_SHIFT; in dvma_print()
73 printk("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr, in dvma_print()
74 dvma_entry_paddr(index)); in dvma_print()
154 unsigned long end, index; in dvma_map_iommu() local
156 index = baddr >> DVMA_PAGE_SHIFT; in dvma_map_iommu()
162 for(; index < end ; index++) { in dvma_map_iommu()
167 dvma_entry_set(index, __pa(kaddr)); in dvma_map_iommu()
169 iommu_pte[index] |= IOMMU_FULL_BLOCK; in dvma_map_iommu()
176 for(index = (baddr >> DVMA_PAGE_SHIFT); index < end; index++) in dvma_map_iommu()
177 dvma_print(index << DVMA_PAGE_SHIFT); in dvma_map_iommu()
186 int index, end; in dvma_unmap_iommu() local
189 index = baddr >> DVMA_PAGE_SHIFT; in dvma_unmap_iommu()
192 for(; index < end ; index++) { in dvma_unmap_iommu()
194 printk("freeing bus mapping %08x\n", index << DVMA_PAGE_SHIFT); in dvma_unmap_iommu()
197 if(!dvma_entry_use(index)) in dvma_unmap_iommu()
199 index); in dvma_unmap_iommu()
201 dvma_entry_dec(index); in dvma_unmap_iommu()
203 dvma_entry_clr(index); in dvma_unmap_iommu()