Lines Matching refs:table_group

230 	struct iommu_table_group *table_group;  in tce_iommu_enable()  local
273 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable()
274 if (!table_group) in tce_iommu_enable()
277 if (!table_group->tce32_size) in tce_iommu_enable()
280 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable()
334 struct iommu_table_group *table_group; in tce_iommu_release() local
341 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_release()
563 struct iommu_table_group *table_group, in tce_iommu_create_table() argument
572 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table()
581 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table()
613 struct iommu_table_group *table_group; in tce_iommu_create_window() local
624 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
625 if (!table_group) in tce_iommu_create_window()
628 if (!(table_group->pgsizes & (1ULL << page_shift))) in tce_iommu_create_window()
631 if (!table_group->ops->set_window || !table_group->ops->unset_window || in tce_iommu_create_window()
632 !table_group->ops->get_table_size || in tce_iommu_create_window()
633 !table_group->ops->create_table) in tce_iommu_create_window()
637 ret = tce_iommu_create_table(container, table_group, num, in tce_iommu_create_window()
649 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
651 ret = table_group->ops->set_window(table_group, num, tbl); in tce_iommu_create_window()
665 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
666 table_group->ops->unset_window(table_group, num); in tce_iommu_create_window()
676 struct iommu_table_group *table_group = NULL; in tce_iommu_remove_window() local
689 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_remove_window()
698 if (!table_group->ops || !table_group->ops->unset_window) in tce_iommu_remove_window()
701 table_group->ops->unset_window(table_group, num); in tce_iommu_remove_window()
736 struct iommu_table_group *table_group; in tce_iommu_ioctl() local
743 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_ioctl()
745 if (!table_group) in tce_iommu_ioctl()
757 info.dma32_window_start = table_group->tce32_start; in tce_iommu_ioctl()
758 info.dma32_window_size = table_group->tce32_size; in tce_iommu_ioctl()
762 if (table_group->max_dynamic_windows_supported && in tce_iommu_ioctl()
765 info.ddw.pgsizes = table_group->pgsizes; in tce_iommu_ioctl()
767 table_group->max_dynamic_windows_supported; in tce_iommu_ioctl()
768 info.ddw.levels = table_group->max_levels; in tce_iommu_ioctl()
1037 struct iommu_table_group *table_group) in tce_iommu_release_ownership() argument
1057 struct iommu_table_group *table_group) in tce_iommu_take_ownership() argument
1062 struct iommu_table *tbl = table_group->tables[i]; in tce_iommu_take_ownership()
1074 table_group->tables[j]); in tce_iommu_take_ownership()
1081 container->tables[i] = table_group->tables[i]; in tce_iommu_take_ownership()
1087 struct iommu_table_group *table_group) in tce_iommu_release_ownership_ddw() argument
1091 if (!table_group->ops->unset_window) { in tce_iommu_release_ownership_ddw()
1097 table_group->ops->unset_window(table_group, i); in tce_iommu_release_ownership_ddw()
1099 table_group->ops->release_ownership(table_group); in tce_iommu_release_ownership_ddw()
1103 struct iommu_table_group *table_group) in tce_iommu_take_ownership_ddw() argument
1108 if (!table_group->ops->create_table || !table_group->ops->set_window || in tce_iommu_take_ownership_ddw()
1109 !table_group->ops->release_ownership) { in tce_iommu_take_ownership_ddw()
1114 table_group->ops->take_ownership(table_group); in tce_iommu_take_ownership_ddw()
1123 table_group, in tce_iommu_take_ownership_ddw()
1126 table_group->tce32_size, in tce_iommu_take_ownership_ddw()
1143 ret = table_group->ops->set_window(table_group, i, tbl); in tce_iommu_take_ownership_ddw()
1152 table_group->ops->unset_window(table_group, i); in tce_iommu_take_ownership_ddw()
1154 table_group->ops->release_ownership(table_group); in tce_iommu_take_ownership_ddw()
1164 struct iommu_table_group *table_group; in tce_iommu_attach_group() local
1171 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_attach_group()
1173 if (tce_groups_attached(container) && (!table_group->ops || in tce_iommu_attach_group()
1174 !table_group->ops->take_ownership || in tce_iommu_attach_group()
1175 !table_group->ops->release_ownership)) { in tce_iommu_attach_group()
1191 if (table_group_tmp->ops != table_group->ops) { in tce_iommu_attach_group()
1206 if (!table_group->ops || !table_group->ops->take_ownership || in tce_iommu_attach_group()
1207 !table_group->ops->release_ownership) in tce_iommu_attach_group()
1208 ret = tce_iommu_take_ownership(container, table_group); in tce_iommu_attach_group()
1210 ret = tce_iommu_take_ownership_ddw(container, table_group); in tce_iommu_attach_group()
1230 struct iommu_table_group *table_group; in tce_iommu_detach_group() local
1252 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_detach_group()
1253 BUG_ON(!table_group); in tce_iommu_detach_group()
1255 if (!table_group->ops || !table_group->ops->release_ownership) in tce_iommu_detach_group()
1256 tce_iommu_release_ownership(container, table_group); in tce_iommu_detach_group()
1258 tce_iommu_release_ownership_ddw(container, table_group); in tce_iommu_detach_group()