• Home
  • Raw
  • Download

Lines Matching refs:cr

41 #define for_each_iotlb_cr(obj, n, __i, cr)				\  argument
43 (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true); \
190 void omap_iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e) in omap_iotlb_cr_to_e() argument
192 BUG_ON(!cr || !e); in omap_iotlb_cr_to_e()
194 arch_iommu->cr_to_e(cr, e); in omap_iotlb_cr_to_e()
198 static inline int iotlb_cr_valid(struct cr_regs *cr) in iotlb_cr_valid() argument
200 if (!cr) in iotlb_cr_valid()
203 return arch_iommu->cr_valid(cr); in iotlb_cr_valid()
215 static u32 iotlb_cr_to_virt(struct cr_regs *cr) in iotlb_cr_to_virt() argument
217 return arch_iommu->cr_to_virt(cr); in iotlb_cr_to_virt()
251 static void iotlb_read_cr(struct omap_iommu *obj, struct cr_regs *cr) in iotlb_read_cr() argument
253 arch_iommu->tlb_read_cr(obj, cr); in iotlb_read_cr()
256 static void iotlb_load_cr(struct omap_iommu *obj, struct cr_regs *cr) in iotlb_load_cr() argument
258 arch_iommu->tlb_load_cr(obj, cr); in iotlb_load_cr()
270 static inline ssize_t iotlb_dump_cr(struct omap_iommu *obj, struct cr_regs *cr, in iotlb_dump_cr() argument
273 BUG_ON(!cr || !buf); in iotlb_dump_cr()
275 return arch_iommu->dump_cr(obj, cr, buf); in iotlb_dump_cr()
281 struct cr_regs cr; in __iotlb_read_cr() local
287 iotlb_read_cr(obj, &cr); in __iotlb_read_cr()
289 return cr; in __iotlb_read_cr()
302 struct cr_regs *cr; in load_iotlb_entry() local
335 cr = iotlb_alloc_cr(obj, e); in load_iotlb_entry()
336 if (IS_ERR(cr)) { in load_iotlb_entry()
338 return PTR_ERR(cr); in load_iotlb_entry()
341 iotlb_load_cr(obj, cr); in load_iotlb_entry()
342 kfree(cr); in load_iotlb_entry()
379 struct cr_regs cr; in flush_iotlb_page() local
383 for_each_iotlb_cr(obj, obj->nr_tlb_entries, i, cr) { in flush_iotlb_page()
387 if (!iotlb_cr_valid(&cr)) in flush_iotlb_page()
390 start = iotlb_cr_to_virt(&cr); in flush_iotlb_page()
391 bytes = iopgsz_to_bytes(cr.cam & 3); in flush_iotlb_page()
396 iotlb_load_cr(obj, &cr); in flush_iotlb_page()
474 struct cr_regs *cr; in omap_dump_tlb_entries() local
477 num = bytes / sizeof(*cr); in omap_dump_tlb_entries()
480 cr = kcalloc(num, sizeof(*cr), GFP_KERNEL); in omap_dump_tlb_entries()
481 if (!cr) in omap_dump_tlb_entries()
484 num = __dump_tlb_entries(obj, cr, num); in omap_dump_tlb_entries()
486 p += iotlb_dump_cr(obj, cr + i, p); in omap_dump_tlb_entries()
487 kfree(cr); in omap_dump_tlb_entries()