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()
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
726 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_remove_window()
735 if (!table_group->ops || !table_group->ops->unset_window) in tce_iommu_remove_window()
738 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
1195 if (!table_group->ops->unset_window) { in tce_iommu_release_ownership()
1205 table_group->ops->unset_window(table_group, i); in tce_iommu_release_ownership()
1211 struct iommu_table_group *table_group) in tce_iommu_take_ownership() argument
1222 ret = table_group->ops->set_window(table_group, i, tbl); in tce_iommu_take_ownership()
1231 table_group->ops->unset_window(table_group, i); in tce_iommu_take_ownership()
1241 struct iommu_table_group *table_group; in tce_iommu_attach_group() local
1251 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_attach_group()
1252 if (!table_group) { in tce_iommu_attach_group()
1258 if (container->v2 && table_group->max_dynamic_windows_supported == 0) { in tce_iommu_attach_group()
1284 table_group->ops->create_table) { in tce_iommu_attach_group()
1299 ret = tce_iommu_take_ownership(container, table_group); in tce_iommu_attach_group()
1321 struct iommu_table_group *table_group; in tce_iommu_detach_group() local
1343 table_group = iommu_group_get_iommudata(iommu_group); in tce_iommu_detach_group()
1344 BUG_ON(!table_group); in tce_iommu_detach_group()
1346 tce_iommu_release_ownership(container, table_group); in tce_iommu_detach_group()