Lines Matching refs:table_group
268 struct iommu_table_group *table_group; in tce_iommu_enable() local
308 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable()
309 if (!table_group) in tce_iommu_enable()
312 if (!table_group->tce32_size) in tce_iommu_enable()
319 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable()
612 struct iommu_table_group *table_group, in tce_iommu_create_table() argument
621 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table()
630 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table()
653 struct iommu_table_group *table_group; in tce_iommu_create_window() local
664 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
665 if (!table_group) in tce_iommu_create_window()
668 if (!(table_group->pgsizes & (1ULL << page_shift))) in tce_iommu_create_window()
671 if (!table_group->ops->set_window || !table_group->ops->unset_window || in tce_iommu_create_window()
672 !table_group->ops->get_table_size || in tce_iommu_create_window()
673 !table_group->ops->create_table) in tce_iommu_create_window()
677 ret = tce_iommu_create_table(container, table_group, num, in tce_iommu_create_window()
689 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
691 ret = table_group->ops->set_window(table_group, num, tbl); in tce_iommu_create_window()
705 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
706 table_group->ops->unset_window(table_group, num); in tce_iommu_create_window()
716 struct iommu_table_group *table_group = NULL; in tce_iommu_remove_window() local
729 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_remove_window()
738 if (!table_group->ops || !table_group->ops->unset_window) in tce_iommu_remove_window()
741 table_group->ops->unset_window(table_group, num); in tce_iommu_remove_window()
757 struct iommu_table_group *table_group; in tce_iommu_create_default_window() local
767 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_default_window()
768 if (!table_group) in tce_iommu_create_default_window()
772 table_group->tce32_size, 1, &start_addr); in tce_iommu_create_default_window()
815 struct iommu_table_group *table_group; in tce_iommu_ioctl() local
822 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_ioctl()
824 if (!table_group) in tce_iommu_ioctl()
836 info.dma32_window_start = table_group->tce32_start; in tce_iommu_ioctl()
837 info.dma32_window_size = table_group->tce32_size; in tce_iommu_ioctl()
841 if (table_group->max_dynamic_windows_supported && in tce_iommu_ioctl()
844 info.ddw.pgsizes = table_group->pgsizes; in tce_iommu_ioctl()
846 table_group->max_dynamic_windows_supported; in tce_iommu_ioctl()
847 info.ddw.levels = table_group->max_levels; in tce_iommu_ioctl()
1147 struct iommu_table_group *table_group) in tce_iommu_release_ownership() argument
1166 struct iommu_table_group *table_group) in tce_iommu_take_ownership() argument
1171 struct iommu_table *tbl = table_group->tables[i]; in tce_iommu_take_ownership()
1180 table_group->tables[j]); in tce_iommu_take_ownership()
1187 container->tables[i] = table_group->tables[i]; in tce_iommu_take_ownership()
1193 struct iommu_table_group *table_group) in tce_iommu_release_ownership_ddw() argument
1197 if (!table_group->ops->unset_window) { in tce_iommu_release_ownership_ddw()
1203 table_group->ops->unset_window(table_group, i); in tce_iommu_release_ownership_ddw()
1205 table_group->ops->release_ownership(table_group); in tce_iommu_release_ownership_ddw()
1209 struct iommu_table_group *table_group) in tce_iommu_take_ownership_ddw() argument
1213 if (!table_group->ops->create_table || !table_group->ops->set_window || in tce_iommu_take_ownership_ddw()
1214 !table_group->ops->release_ownership) { in tce_iommu_take_ownership_ddw()
1219 table_group->ops->take_ownership(table_group); in tce_iommu_take_ownership_ddw()
1228 ret = table_group->ops->set_window(table_group, i, tbl); in tce_iommu_take_ownership_ddw()
1237 table_group->ops->unset_window(table_group, i); in tce_iommu_take_ownership_ddw()
1239 table_group->ops->release_ownership(table_group); in tce_iommu_take_ownership_ddw()
1249 struct iommu_table_group *table_group; in tce_iommu_attach_group() local
1256 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_attach_group()
1257 if (!table_group) { in tce_iommu_attach_group()
1262 if (tce_groups_attached(container) && (!table_group->ops || in tce_iommu_attach_group()
1263 !table_group->ops->take_ownership || in tce_iommu_attach_group()
1264 !table_group->ops->release_ownership)) { in tce_iommu_attach_group()
1281 table_group->ops->create_table) { in tce_iommu_attach_group()
1296 if (!table_group->ops || !table_group->ops->take_ownership || in tce_iommu_attach_group()
1297 !table_group->ops->release_ownership) { in tce_iommu_attach_group()
1302 ret = tce_iommu_take_ownership(container, table_group); in tce_iommu_attach_group()
1308 ret = tce_iommu_take_ownership_ddw(container, table_group); in tce_iommu_attach_group()
1331 struct iommu_table_group *table_group; in tce_iommu_detach_group() local
1353 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_detach_group()
1354 BUG_ON(!table_group); in tce_iommu_detach_group()
1356 if (!table_group->ops || !table_group->ops->release_ownership) in tce_iommu_detach_group()
1357 tce_iommu_release_ownership(container, table_group); in tce_iommu_detach_group()
1359 tce_iommu_release_ownership_ddw(container, table_group); in tce_iommu_detach_group()