Lines Matching refs:c
101 struct ppc_vm_region *c, *new; in ppc_vm_region_alloc() local
109 list_for_each_entry(c, &head->vm_list, vm_list) { in ppc_vm_region_alloc()
112 if ((addr + size) <= c->vm_start) in ppc_vm_region_alloc()
114 addr = c->vm_end; in ppc_vm_region_alloc()
123 list_add_tail(&new->vm_list, &c->vm_list); in ppc_vm_region_alloc()
139 struct ppc_vm_region *c; in ppc_vm_region_find() local
141 list_for_each_entry(c, &head->vm_list, vm_list) { in ppc_vm_region_find()
142 if (c->vm_start == addr) in ppc_vm_region_find()
145 c = NULL; in ppc_vm_region_find()
147 return c; in ppc_vm_region_find()
158 struct ppc_vm_region *c; in __dma_alloc_coherent() local
215 c = ppc_vm_region_alloc(&consistent_head, size, in __dma_alloc_coherent()
217 if (c) { in __dma_alloc_coherent()
218 unsigned long vaddr = c->vm_start; in __dma_alloc_coherent()
244 return (void *)c->vm_start; in __dma_alloc_coherent()
259 struct ppc_vm_region *c; in __dma_free_coherent() local
266 c = ppc_vm_region_find(&consistent_head, (unsigned long)vaddr); in __dma_free_coherent()
267 if (!c) in __dma_free_coherent()
270 if ((c->vm_end - c->vm_start) != size) { in __dma_free_coherent()
272 __func__, c->vm_end - c->vm_start, size); in __dma_free_coherent()
274 size = c->vm_end - c->vm_start; in __dma_free_coherent()
277 addr = c->vm_start; in __dma_free_coherent()
297 flush_tlb_kernel_range(c->vm_start, c->vm_end); in __dma_free_coherent()
299 list_del(&c->vm_list); in __dma_free_coherent()
303 kfree(c); in __dma_free_coherent()