Lines Matching refs:table_group

240 	struct iommu_table_group *table_group;  in tce_iommu_enable()  local
280 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable()
281 if (!table_group) in tce_iommu_enable()
284 if (!table_group->tce32_size) in tce_iommu_enable()
291 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable()
607 struct iommu_table_group *table_group, in tce_iommu_create_table() argument
616 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table()
625 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table()
648 struct iommu_table_group *table_group; in tce_iommu_create_window() local
659 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
660 if (!table_group) in tce_iommu_create_window()
663 if (!(table_group->pgsizes & (1ULL << page_shift))) in tce_iommu_create_window()
666 if (!table_group->ops->set_window || !table_group->ops->unset_window || in tce_iommu_create_window()
667 !table_group->ops->get_table_size || in tce_iommu_create_window()
668 !table_group->ops->create_table) in tce_iommu_create_window()
672 ret = tce_iommu_create_table(container, table_group, num, in tce_iommu_create_window()
684 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
686 ret = table_group->ops->set_window(table_group, num, tbl); in tce_iommu_create_window()
700 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
701 table_group->ops->unset_window(table_group, num); in tce_iommu_create_window()
711 struct iommu_table_group *table_group = NULL; in tce_iommu_remove_window() local
724 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_remove_window()
733 if (!table_group->ops || !table_group->ops->unset_window) in tce_iommu_remove_window()
736 table_group->ops->unset_window(table_group, num); in tce_iommu_remove_window()
752 struct iommu_table_group *table_group; in tce_iommu_create_default_window() local
762 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_default_window()
763 if (!table_group) in tce_iommu_create_default_window()
767 table_group->tce32_size, 1, &start_addr); in tce_iommu_create_default_window()
810 struct iommu_table_group *table_group; in tce_iommu_ioctl() local
817 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_ioctl()
819 if (!table_group) in tce_iommu_ioctl()
831 info.dma32_window_start = table_group->tce32_start; in tce_iommu_ioctl()
832 info.dma32_window_size = table_group->tce32_size; in tce_iommu_ioctl()
836 if (table_group->max_dynamic_windows_supported && in tce_iommu_ioctl()
839 info.ddw.pgsizes = table_group->pgsizes; in tce_iommu_ioctl()
841 table_group->max_dynamic_windows_supported; in tce_iommu_ioctl()
842 info.ddw.levels = table_group->max_levels; in tce_iommu_ioctl()
1142 struct iommu_table_group *table_group) in tce_iommu_release_ownership() argument
1161 struct iommu_table_group *table_group) in tce_iommu_take_ownership() argument
1166 struct iommu_table *tbl = table_group->tables[i]; in tce_iommu_take_ownership()
1175 table_group->tables[j]); in tce_iommu_take_ownership()
1182 container->tables[i] = table_group->tables[i]; in tce_iommu_take_ownership()
1188 struct iommu_table_group *table_group) in tce_iommu_release_ownership_ddw() argument
1192 if (!table_group->ops->unset_window) { in tce_iommu_release_ownership_ddw()
1199 table_group->ops->unset_window(table_group, i); in tce_iommu_release_ownership_ddw()
1201 table_group->ops->release_ownership(table_group); in tce_iommu_release_ownership_ddw()
1205 struct iommu_table_group *table_group) in tce_iommu_take_ownership_ddw() argument
1209 if (!table_group->ops->create_table || !table_group->ops->set_window || in tce_iommu_take_ownership_ddw()
1210 !table_group->ops->release_ownership) { in tce_iommu_take_ownership_ddw()
1215 table_group->ops->take_ownership(table_group); in tce_iommu_take_ownership_ddw()
1224 ret = table_group->ops->set_window(table_group, i, tbl); in tce_iommu_take_ownership_ddw()
1233 table_group->ops->unset_window(table_group, i); in tce_iommu_take_ownership_ddw()
1235 table_group->ops->release_ownership(table_group); in tce_iommu_take_ownership_ddw()
1245 struct iommu_table_group *table_group; in tce_iommu_attach_group() local
1252 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_attach_group()
1253 if (!table_group) { in tce_iommu_attach_group()
1258 if (tce_groups_attached(container) && (!table_group->ops || in tce_iommu_attach_group()
1259 !table_group->ops->take_ownership || in tce_iommu_attach_group()
1260 !table_group->ops->release_ownership)) { in tce_iommu_attach_group()
1277 table_group->ops->create_table) { in tce_iommu_attach_group()
1292 if (!table_group->ops || !table_group->ops->take_ownership || in tce_iommu_attach_group()
1293 !table_group->ops->release_ownership) { in tce_iommu_attach_group()
1298 ret = tce_iommu_take_ownership(container, table_group); in tce_iommu_attach_group()
1304 ret = tce_iommu_take_ownership_ddw(container, table_group); in tce_iommu_attach_group()
1328 struct iommu_table_group *table_group; in tce_iommu_detach_group() local
1350 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_detach_group()
1351 BUG_ON(!table_group); in tce_iommu_detach_group()
1353 if (!table_group->ops || !table_group->ops->release_ownership) in tce_iommu_detach_group()
1354 tce_iommu_release_ownership(container, table_group); in tce_iommu_detach_group()
1356 tce_iommu_release_ownership_ddw(container, table_group); in tce_iommu_detach_group()