Lines Matching refs:table_group

1155 	set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]);  in pnv_pci_ioda_dma_dev_setup()
1158 if (pe->table_group.group) in pnv_pci_ioda_dma_dev_setup()
1159 iommu_add_device(&pe->table_group, &pdev->dev); in pnv_pci_ioda_dma_dev_setup()
1282 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_p7ioc_tce_invalidate()
1283 struct pnv_ioda_pe, table_group); in pnv_pci_p7ioc_tce_invalidate()
1406 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda2_tce_invalidate()
1407 struct pnv_ioda_pe, table_group); in pnv_pci_ioda2_tce_invalidate()
1557 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda1_setup_dma_pe()
1559 pnv_pci_link_table_and_group(phb->hose->node, 0, tbl, &pe->table_group); in pnv_pci_ioda1_setup_dma_pe()
1610 pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe()
1611 pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe()
1623 pnv_pci_unlink_table_and_group(tbl, &pe->table_group); in pnv_pci_ioda1_setup_dma_pe()
1628 static long pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_set_window() argument
1631 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_set_window()
1632 table_group); in pnv_pci_ioda2_set_window()
1661 tbl, &pe->table_group); in pnv_pci_ioda2_set_window()
1695 static long pnv_pci_ioda2_create_table(struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table() argument
1699 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_create_table()
1700 table_group); in pnv_pci_ioda2_create_table()
1702 __u64 bus_offset = num ? pe->tce_bypass_base : table_group->tce32_start; in pnv_pci_ioda2_create_table()
1767 rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, PAGE_SHIFT, in pnv_pci_ioda2_setup_default_config()
1785 rc = pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); in pnv_pci_ioda2_setup_default_config()
1807 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_unset_window() argument
1810 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_unset_window()
1811 table_group); in pnv_pci_ioda2_unset_window()
1826 pnv_pci_unlink_table_and_group(table_group->tables[num], table_group); in pnv_pci_ioda2_unset_window()
1865 struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table_userspace() argument
1869 long ret = pnv_pci_ioda2_create_table(table_group, in pnv_pci_ioda2_create_table_userspace()
1883 set_iommu_table_base(&dev->dev, pe->table_group.tables[0]); in pnv_ioda_setup_bus_dma()
1891 static void pnv_ioda2_take_ownership(struct iommu_table_group *table_group) in pnv_ioda2_take_ownership() argument
1893 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_take_ownership()
1894 table_group); in pnv_ioda2_take_ownership()
1896 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_ioda2_take_ownership()
1899 pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_ioda2_take_ownership()
1907 static void pnv_ioda2_release_ownership(struct iommu_table_group *table_group) in pnv_ioda2_release_ownership() argument
1909 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_ioda2_release_ownership()
1910 table_group); in pnv_ioda2_release_ownership()
1940 pe->table_group.tce32_start = 0; in pnv_pci_ioda2_setup_dma_pe()
1941 pe->table_group.tce32_size = phb->ioda.m32_pci_base; in pnv_pci_ioda2_setup_dma_pe()
1942 pe->table_group.max_dynamic_windows_supported = in pnv_pci_ioda2_setup_dma_pe()
1944 pe->table_group.max_levels = POWERNV_IOMMU_MAX_LEVELS; in pnv_pci_ioda2_setup_dma_pe()
1945 pe->table_group.pgsizes = pnv_ioda_parse_tce_sizes(phb); in pnv_pci_ioda2_setup_dma_pe()
1952 pe->table_group.ops = &pnv_pci_ioda2_ops; in pnv_pci_ioda2_setup_dma_pe()
1953 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda2_setup_dma_pe()
2694 static long pnv_pci_ioda1_unset_window(struct iommu_table_group *table_group, in pnv_pci_ioda1_unset_window() argument
2697 struct pnv_ioda_pe *pe = container_of(table_group, in pnv_pci_ioda1_unset_window()
2698 struct pnv_ioda_pe, table_group); in pnv_pci_ioda1_unset_window()
2719 pnv_pci_unlink_table_and_group(table_group->tables[num], table_group); in pnv_pci_ioda1_unset_window()
2725 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_pci_ioda1_release_pe_dma()
2731 rc = pnv_pci_ioda1_unset_window(&pe->table_group, 0); in pnv_pci_ioda1_release_pe_dma()
2736 if (pe->table_group.group) { in pnv_pci_ioda1_release_pe_dma()
2737 iommu_group_put(pe->table_group.group); in pnv_pci_ioda1_release_pe_dma()
2738 WARN_ON(pe->table_group.group); in pnv_pci_ioda1_release_pe_dma()
2747 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_pe_dma()
2753 rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_pci_ioda2_release_pe_dma()
2758 if (pe->table_group.group) { in pnv_pci_ioda2_release_pe_dma()
2759 iommu_group_put(pe->table_group.group); in pnv_pci_ioda2_release_pe_dma()
2760 WARN_ON(pe->table_group.group); in pnv_pci_ioda2_release_pe_dma()