Lines Matching refs:table_group
1261 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group,
1270 tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_dma_pe()
1271 rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_pci_ioda2_release_dma_pe()
1276 if (pe->table_group.group) { in pnv_pci_ioda2_release_dma_pe()
1277 iommu_group_put(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1278 BUG_ON(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1564 set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]); in pnv_pci_ioda_dma_dev_setup()
1631 set_iommu_table_base(&dev->dev, pe->table_group.tables[0]); in pnv_ioda_setup_bus_dma()
1646 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda1_tce_invalidate()
1647 struct pnv_ioda_pe, table_group); in pnv_pci_ioda1_tce_invalidate()
1783 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda2_tce_invalidate()
1784 struct pnv_ioda_pe, table_group); in pnv_pci_ioda2_tce_invalidate()
1868 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda_setup_dma_pe()
1870 pnv_pci_link_table_and_group(phb->hose->node, 0, tbl, &pe->table_group); in pnv_pci_ioda_setup_dma_pe()
1916 pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda_setup_dma_pe()
1917 pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda_setup_dma_pe()
1939 pnv_pci_unlink_table_and_group(tbl, &pe->table_group); in pnv_pci_ioda_setup_dma_pe()
1944 static long pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_set_window() argument
1947 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_set_window()
1948 table_group); in pnv_pci_ioda2_set_window()
1977 tbl, &pe->table_group); in pnv_pci_ioda2_set_window()
2015 static long pnv_pci_ioda2_create_table(struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table() argument
2019 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_create_table()
2020 table_group); in pnv_pci_ioda2_create_table()
2022 __u64 bus_offset = num ? pe->tce_bypass_base : table_group->tce32_start; in pnv_pci_ioda2_create_table()
2064 const u64 window_size = min((u64)pe->table_group.tce32_size, max_memory); in pnv_pci_ioda2_setup_default_config()
2066 rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, in pnv_pci_ioda2_setup_default_config()
2078 rc = pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); in pnv_pci_ioda2_setup_default_config()
2105 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_unset_window() argument
2108 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_unset_window()
2109 table_group); in pnv_pci_ioda2_unset_window()
2124 pnv_pci_unlink_table_and_group(table_group->tables[num], table_group); in pnv_pci_ioda2_unset_window()
2163 static void pnv_ioda2_take_ownership(struct iommu_table_group *table_group) in pnv_ioda2_take_ownership() argument
2165 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_take_ownership()
2166 table_group); in pnv_ioda2_take_ownership()
2168 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_ioda2_take_ownership()
2171 pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_ioda2_take_ownership()
2175 static void pnv_ioda2_release_ownership(struct iommu_table_group *table_group) in pnv_ioda2_release_ownership() argument
2177 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_release_ownership()
2178 table_group); in pnv_ioda2_release_ownership()
2353 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda2_setup_dma_pe()
2362 pe->table_group.tce32_start = 0; in pnv_pci_ioda2_setup_dma_pe()
2363 pe->table_group.tce32_size = phb->ioda.m32_pci_base; in pnv_pci_ioda2_setup_dma_pe()
2364 pe->table_group.max_dynamic_windows_supported = in pnv_pci_ioda2_setup_dma_pe()
2366 pe->table_group.max_levels = POWERNV_IOMMU_MAX_LEVELS; in pnv_pci_ioda2_setup_dma_pe()
2367 pe->table_group.pgsizes = SZ_4K | SZ_64K | SZ_16M; in pnv_pci_ioda2_setup_dma_pe()
2369 pe->table_group.ops = &pnv_pci_ioda2_ops; in pnv_pci_ioda2_setup_dma_pe()