Lines Matching refs:table_group

1154 	set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]);  in pnv_pci_ioda_dma_dev_setup()
1157 if (pe->table_group.group) in pnv_pci_ioda_dma_dev_setup()
1158 iommu_add_device(&pe->table_group, &pdev->dev); in pnv_pci_ioda_dma_dev_setup()
1283 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_p7ioc_tce_invalidate()
1284 struct pnv_ioda_pe, table_group); in pnv_pci_p7ioc_tce_invalidate()
1415 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda2_tce_invalidate()
1416 struct pnv_ioda_pe, table_group); in pnv_pci_ioda2_tce_invalidate()
1566 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda1_setup_dma_pe()
1568 pnv_pci_link_table_and_group(phb->hose->node, 0, tbl, &pe->table_group); in pnv_pci_ioda1_setup_dma_pe()
1619 pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe()
1620 pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe()
1631 pnv_pci_unlink_table_and_group(tbl, &pe->table_group); in pnv_pci_ioda1_setup_dma_pe()
1636 static long pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_set_window() argument
1639 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_set_window()
1640 table_group); in pnv_pci_ioda2_set_window()
1669 tbl, &pe->table_group); in pnv_pci_ioda2_set_window()
1703 static long pnv_pci_ioda2_create_table(struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table() argument
1707 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_create_table()
1708 table_group); in pnv_pci_ioda2_create_table()
1710 __u64 bus_offset = num ? pe->tce_bypass_base : table_group->tce32_start; in pnv_pci_ioda2_create_table()
1775 rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, PAGE_SHIFT, in pnv_pci_ioda2_setup_default_config()
1792 rc = pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); in pnv_pci_ioda2_setup_default_config()
1814 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_unset_window() argument
1817 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_unset_window()
1818 table_group); in pnv_pci_ioda2_unset_window()
1833 pnv_pci_unlink_table_and_group(table_group->tables[num], table_group); in pnv_pci_ioda2_unset_window()
1872 struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table_userspace() argument
1876 long ret = pnv_pci_ioda2_create_table(table_group, in pnv_pci_ioda2_create_table_userspace()
1890 set_iommu_table_base(&dev->dev, pe->table_group.tables[0]); in pnv_ioda_setup_bus_dma()
1898 static void pnv_ioda2_take_ownership(struct iommu_table_group *table_group) in pnv_ioda2_take_ownership() argument
1900 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_take_ownership()
1901 table_group); in pnv_ioda2_take_ownership()
1903 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_ioda2_take_ownership()
1906 pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_ioda2_take_ownership()
1914 static void pnv_ioda2_release_ownership(struct iommu_table_group *table_group) in pnv_ioda2_release_ownership() argument
1916 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_release_ownership()
1917 table_group); in pnv_ioda2_release_ownership()
1947 pe->table_group.tce32_start = 0; in pnv_pci_ioda2_setup_dma_pe()
1948 pe->table_group.tce32_size = phb->ioda.m32_pci_base; in pnv_pci_ioda2_setup_dma_pe()
1949 pe->table_group.max_dynamic_windows_supported = in pnv_pci_ioda2_setup_dma_pe()
1951 pe->table_group.max_levels = POWERNV_IOMMU_MAX_LEVELS; in pnv_pci_ioda2_setup_dma_pe()
1952 pe->table_group.pgsizes = pnv_ioda_parse_tce_sizes(phb); in pnv_pci_ioda2_setup_dma_pe()
1959 pe->table_group.ops = &pnv_pci_ioda2_ops; in pnv_pci_ioda2_setup_dma_pe()
1960 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda2_setup_dma_pe()
2700 static long pnv_pci_ioda1_unset_window(struct iommu_table_group *table_group, in pnv_pci_ioda1_unset_window() argument
2703 struct pnv_ioda_pe *pe = container_of(table_group, in pnv_pci_ioda1_unset_window()
2704 struct pnv_ioda_pe, table_group); in pnv_pci_ioda1_unset_window()
2725 pnv_pci_unlink_table_and_group(table_group->tables[num], table_group); in pnv_pci_ioda1_unset_window()
2731 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_pci_ioda1_release_pe_dma()
2737 rc = pnv_pci_ioda1_unset_window(&pe->table_group, 0); in pnv_pci_ioda1_release_pe_dma()
2742 if (pe->table_group.group) { in pnv_pci_ioda1_release_pe_dma()
2743 iommu_group_put(pe->table_group.group); in pnv_pci_ioda1_release_pe_dma()
2744 WARN_ON(pe->table_group.group); in pnv_pci_ioda1_release_pe_dma()
2753 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_pe_dma()
2759 rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_pci_ioda2_release_pe_dma()
2764 if (pe->table_group.group) { in pnv_pci_ioda2_release_pe_dma()
2765 iommu_group_put(pe->table_group.group); in pnv_pci_ioda2_release_pe_dma()
2766 WARN_ON(pe->table_group.group); in pnv_pci_ioda2_release_pe_dma()