Lines Matching defs:index
44 #define dvma_entry_paddr(index) (iommu_pte[index] & IOMMU_ADDR_MASK)
45 #define dvma_entry_vaddr(index,paddr) ((index << DVMA_PAGE_SHIFT) | \
47 #define dvma_entry_set(index,addr) (iommu_pte[index] = \
50 #define dvma_entry_clr(index) (iommu_pte[index] = IOMMU_DT_INVALID)
62 unsigned long index;
64 index = dvma_addr >> DVMA_PAGE_SHIFT;
66 printk("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr,
67 dvma_entry_paddr(index));
148 unsigned long end, index;
150 index = baddr >> DVMA_PAGE_SHIFT;
156 for(; index < end ; index++) {
157 // if(dvma_entry_use(index))
159 // printk("mapping pa %lx to ba %lx\n", __pa(kaddr), index << DVMA_PAGE_SHIFT);
161 dvma_entry_set(index, __pa(kaddr));
163 iommu_pte[index] |= IOMMU_FULL_BLOCK;
164 // dvma_entry_inc(index);
170 for(index = (baddr >> DVMA_PAGE_SHIFT); index < end; index++)
171 dvma_print(index << DVMA_PAGE_SHIFT);
180 int index, end;
183 index = baddr >> DVMA_PAGE_SHIFT;
186 for(; index < end ; index++) {
188 printk("freeing bus mapping %08x\n", index << DVMA_PAGE_SHIFT);
190 dvma_entry_clr(index);