Lines Matching refs:table_group

242 	struct iommu_table_group *table_group;  in tce_iommu_enable()  local
282 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable()
283 if (!table_group) in tce_iommu_enable()
286 if (!table_group->tce32_size) in tce_iommu_enable()
293 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable()
608 struct iommu_table_group *table_group, in tce_iommu_create_table() argument
617 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table()
626 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table()
649 struct iommu_table_group *table_group; in tce_iommu_create_window() local
660 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
661 if (!table_group) in tce_iommu_create_window()
664 if (!(table_group->pgsizes & (1ULL << page_shift))) in tce_iommu_create_window()
667 if (!table_group->ops->set_window || !table_group->ops->unset_window || in tce_iommu_create_window()
668 !table_group->ops->get_table_size || in tce_iommu_create_window()
669 !table_group->ops->create_table) in tce_iommu_create_window()
673 ret = tce_iommu_create_table(container, table_group, num, in tce_iommu_create_window()
685 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
687 ret = table_group->ops->set_window(table_group, num, tbl); in tce_iommu_create_window()
701 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
702 table_group->ops->unset_window(table_group, num); in tce_iommu_create_window()
712 struct iommu_table_group *table_group = NULL; in tce_iommu_remove_window() local
725 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_remove_window()
734 if (!table_group->ops || !table_group->ops->unset_window) in tce_iommu_remove_window()
737 table_group->ops->unset_window(table_group, num); in tce_iommu_remove_window()
753 struct iommu_table_group *table_group; in tce_iommu_create_default_window() local
763 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_default_window()
764 if (!table_group) in tce_iommu_create_default_window()
768 table_group->tce32_size, 1, &start_addr); in tce_iommu_create_default_window()
860 struct iommu_table_group *table_group; in tce_iommu_ioctl() local
867 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_ioctl()
869 if (!table_group) in tce_iommu_ioctl()
881 info.dma32_window_start = table_group->tce32_start; in tce_iommu_ioctl()
882 info.dma32_window_size = table_group->tce32_size; in tce_iommu_ioctl()
886 if (table_group->max_dynamic_windows_supported && in tce_iommu_ioctl()
889 info.ddw.pgsizes = table_group->pgsizes; in tce_iommu_ioctl()
891 table_group->max_dynamic_windows_supported; in tce_iommu_ioctl()
892 info.ddw.levels = table_group->max_levels; in tce_iommu_ioctl()
1191 struct iommu_table_group *table_group) in tce_iommu_release_ownership() argument
1210 struct iommu_table_group *table_group) in tce_iommu_take_ownership() argument
1215 struct iommu_table *tbl = table_group->tables[i]; in tce_iommu_take_ownership()
1224 table_group->tables[j]); in tce_iommu_take_ownership()
1231 container->tables[i] = table_group->tables[i]; in tce_iommu_take_ownership()
1237 struct iommu_table_group *table_group) in tce_iommu_release_ownership_ddw() argument
1241 if (!table_group->ops->unset_window) { in tce_iommu_release_ownership_ddw()
1248 table_group->ops->unset_window(table_group, i); in tce_iommu_release_ownership_ddw()
1250 table_group->ops->release_ownership(table_group); in tce_iommu_release_ownership_ddw()
1254 struct iommu_table_group *table_group) in tce_iommu_take_ownership_ddw() argument
1258 if (!table_group->ops->create_table || !table_group->ops->set_window || in tce_iommu_take_ownership_ddw()
1259 !table_group->ops->release_ownership) { in tce_iommu_take_ownership_ddw()
1264 table_group->ops->take_ownership(table_group); in tce_iommu_take_ownership_ddw()
1273 ret = table_group->ops->set_window(table_group, i, tbl); in tce_iommu_take_ownership_ddw()
1282 table_group->ops->unset_window(table_group, i); in tce_iommu_take_ownership_ddw()
1284 table_group->ops->release_ownership(table_group); in tce_iommu_take_ownership_ddw()
1294 struct iommu_table_group *table_group; in tce_iommu_attach_group() local
1304 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_attach_group()
1305 if (!table_group) { in tce_iommu_attach_group()
1310 if (tce_groups_attached(container) && (!table_group->ops || in tce_iommu_attach_group()
1311 !table_group->ops->take_ownership || in tce_iommu_attach_group()
1312 !table_group->ops->release_ownership)) { in tce_iommu_attach_group()
1332 table_group->ops->create_table) { in tce_iommu_attach_group()
1347 if (!table_group->ops || !table_group->ops->take_ownership || in tce_iommu_attach_group()
1348 !table_group->ops->release_ownership) { in tce_iommu_attach_group()
1353 ret = tce_iommu_take_ownership(container, table_group); in tce_iommu_attach_group()
1359 ret = tce_iommu_take_ownership_ddw(container, table_group); in tce_iommu_attach_group()
1383 struct iommu_table_group *table_group; in tce_iommu_detach_group() local
1405 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_detach_group()
1406 BUG_ON(!table_group); in tce_iommu_detach_group()
1408 if (!table_group->ops || !table_group->ops->release_ownership) in tce_iommu_detach_group()
1409 tce_iommu_release_ownership(container, table_group); in tce_iommu_detach_group()
1411 tce_iommu_release_ownership_ddw(container, table_group); in tce_iommu_detach_group()