Lines Matching refs:vaddr

96 static unsigned long iounit_get_area(struct iounit_struct *iounit, unsigned long vaddr, int size)  in iounit_get_area()  argument
102 npages = ((vaddr & ~PAGE_MASK) + size + (PAGE_SIZE-1)) >> PAGE_SHIFT; in iounit_get_area()
111 IOD(("iounit_get_area(%08lx,%d[%d])=", vaddr, size, npages)); in iounit_get_area()
126 panic("iounit_get_area: Couldn't find free iopte slots for (%08lx,%d)\n", vaddr, size); in iounit_get_area()
134 iopte = MKIOPTE(__pa(vaddr & PAGE_MASK)); in iounit_get_area()
135 vaddr = IOUNIT_DMA_BASE + (scan << PAGE_SHIFT) + (vaddr & ~PAGE_MASK); in iounit_get_area()
140 IOD(("%08lx\n", vaddr)); in iounit_get_area()
141 return vaddr; in iounit_get_area()
148 void *vaddr = page_address(page) + offset; in iounit_map_page() local
157 ret = iounit_get_area(iounit, (unsigned long)vaddr, len); in iounit_map_page()
180 static void iounit_unmap_page(struct device *dev, dma_addr_t vaddr, size_t len, in iounit_unmap_page() argument
187 len = ((vaddr & ~PAGE_MASK) + len + (PAGE_SIZE-1)) >> PAGE_SHIFT; in iounit_unmap_page()
188 vaddr = (vaddr - IOUNIT_DMA_BASE) >> PAGE_SHIFT; in iounit_unmap_page()
189 IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); in iounit_unmap_page()
190 for (len += vaddr; vaddr < len; vaddr++) in iounit_unmap_page()
191 clear_bit(vaddr, iounit->bmap); in iounit_unmap_page()
199 unsigned long flags, vaddr, len; in iounit_unmap_sg() local
206 vaddr = (sg->dma_address - IOUNIT_DMA_BASE) >> PAGE_SHIFT; in iounit_unmap_sg()
207 IOD(("iounit_release %08lx-%08lx\n", (long)vaddr, (long)len+vaddr)); in iounit_unmap_sg()
208 for (len += vaddr; vaddr < len; vaddr++) in iounit_unmap_sg()
209 clear_bit(vaddr, iounit->bmap); in iounit_unmap_sg()