Lines Matching refs:dart_domain

520 	struct apple_dart_domain *dart_domain = to_dart_domain(domain);  in apple_dart_iova_to_phys()  local
521 struct io_pgtable_ops *ops = dart_domain->pgtbl_ops; in apple_dart_iova_to_phys()
534 struct apple_dart_domain *dart_domain = to_dart_domain(domain); in apple_dart_map_pages() local
535 struct io_pgtable_ops *ops = dart_domain->pgtbl_ops; in apple_dart_map_pages()
549 struct apple_dart_domain *dart_domain = to_dart_domain(domain); in apple_dart_unmap_pages() local
550 struct io_pgtable_ops *ops = dart_domain->pgtbl_ops; in apple_dart_unmap_pages()
573 static int apple_dart_finalize_domain(struct apple_dart_domain *dart_domain, in apple_dart_finalize_domain() argument
584 mutex_lock(&dart_domain->init_lock); in apple_dart_finalize_domain()
586 if (dart_domain->finalized) in apple_dart_finalize_domain()
590 dart_domain->stream_maps[i].dart = cfg->stream_maps[i].dart; in apple_dart_finalize_domain()
592 atomic_long_set(&dart_domain->stream_maps[i].sidmap[j], in apple_dart_finalize_domain()
604 dart_domain->pgtbl_ops = alloc_io_pgtable_ops(dart->hw->fmt, &pgtbl_cfg, in apple_dart_finalize_domain()
605 &dart_domain->domain); in apple_dart_finalize_domain()
606 if (!dart_domain->pgtbl_ops) { in apple_dart_finalize_domain()
611 dart_domain->domain.pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in apple_dart_finalize_domain()
612 dart_domain->domain.geometry.aperture_start = 0; in apple_dart_finalize_domain()
613 dart_domain->domain.geometry.aperture_end = in apple_dart_finalize_domain()
615 dart_domain->domain.geometry.force_aperture = true; in apple_dart_finalize_domain()
617 dart_domain->finalized = true; in apple_dart_finalize_domain()
620 mutex_unlock(&dart_domain->init_lock); in apple_dart_finalize_domain()
665 struct apple_dart_domain *dart_domain = to_dart_domain(domain); in apple_dart_attach_dev_paging() local
667 ret = apple_dart_finalize_domain(dart_domain, cfg); in apple_dart_attach_dev_paging()
671 ret = apple_dart_domain_add_streams(dart_domain, cfg); in apple_dart_attach_dev_paging()
676 apple_dart_setup_translation(dart_domain, stream_map); in apple_dart_attach_dev_paging()
751 struct apple_dart_domain *dart_domain; in apple_dart_domain_alloc_paging() local
753 dart_domain = kzalloc(sizeof(*dart_domain), GFP_KERNEL); in apple_dart_domain_alloc_paging()
754 if (!dart_domain) in apple_dart_domain_alloc_paging()
757 mutex_init(&dart_domain->init_lock); in apple_dart_domain_alloc_paging()
763 ret = apple_dart_finalize_domain(dart_domain, cfg); in apple_dart_domain_alloc_paging()
765 kfree(dart_domain); in apple_dart_domain_alloc_paging()
769 return &dart_domain->domain; in apple_dart_domain_alloc_paging()
774 struct apple_dart_domain *dart_domain = to_dart_domain(domain); in apple_dart_domain_free() local
776 if (dart_domain->pgtbl_ops) in apple_dart_domain_free()
777 free_io_pgtable_ops(dart_domain->pgtbl_ops); in apple_dart_domain_free()
779 kfree(dart_domain); in apple_dart_domain_free()