Lines Matching refs:tbl
1165 static int pnv_ioda_tce_xchg_no_kill(struct iommu_table *tbl, long index, in pnv_ioda_tce_xchg_no_kill() argument
1168 return pnv_tce_xchg(tbl, index, hpa, direction); in pnv_ioda_tce_xchg_no_kill()
1221 static void pnv_pci_ioda2_tce_invalidate(struct iommu_table *tbl, in pnv_pci_ioda2_tce_invalidate() argument
1226 list_for_each_entry_lockless(tgl, &tbl->it_group_list, next) { in pnv_pci_ioda2_tce_invalidate()
1230 unsigned int shift = tbl->it_page_shift; in pnv_pci_ioda2_tce_invalidate()
1243 static int pnv_ioda2_tce_build(struct iommu_table *tbl, long index, in pnv_ioda2_tce_build() argument
1248 int ret = pnv_tce_build(tbl, index, npages, uaddr, direction, in pnv_ioda2_tce_build()
1252 pnv_pci_ioda2_tce_invalidate(tbl, index, npages); in pnv_ioda2_tce_build()
1257 static void pnv_ioda2_tce_free(struct iommu_table *tbl, long index, in pnv_ioda2_tce_free() argument
1260 pnv_tce_free(tbl, index, npages); in pnv_ioda2_tce_free()
1262 pnv_pci_ioda2_tce_invalidate(tbl, index, npages); in pnv_ioda2_tce_free()
1278 int num, struct iommu_table *tbl) in pnv_pci_ioda2_set_window() argument
1284 const unsigned long size = tbl->it_indirect_levels ? in pnv_pci_ioda2_set_window()
1285 tbl->it_level_size : tbl->it_size; in pnv_pci_ioda2_set_window()
1286 const __u64 start_addr = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda2_set_window()
1287 const __u64 win_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda2_set_window()
1291 IOMMU_PAGE_SIZE(tbl)); in pnv_pci_ioda2_set_window()
1300 tbl->it_indirect_levels + 1, in pnv_pci_ioda2_set_window()
1301 __pa(tbl->it_base), in pnv_pci_ioda2_set_window()
1303 IOMMU_PAGE_SIZE(tbl)); in pnv_pci_ioda2_set_window()
1310 tbl, &pe->table_group); in pnv_pci_ioda2_set_window()
1353 struct iommu_table *tbl; in pnv_pci_ioda2_create_table() local
1355 tbl = pnv_pci_table_alloc(nid); in pnv_pci_ioda2_create_table()
1356 if (!tbl) in pnv_pci_ioda2_create_table()
1359 tbl->it_ops = &pnv_ioda2_iommu_ops; in pnv_pci_ioda2_create_table()
1363 levels, alloc_userspace_copy, tbl); in pnv_pci_ioda2_create_table()
1365 iommu_tce_table_put(tbl); in pnv_pci_ioda2_create_table()
1369 *ptbl = tbl; in pnv_pci_ioda2_create_table()
1376 struct iommu_table *tbl = NULL; in pnv_pci_ioda2_setup_default_config() local
1417 window_size, levels, false, &tbl); in pnv_pci_ioda2_setup_default_config()
1428 res_start = pe->phb->ioda.m32_pci_base >> tbl->it_page_shift; in pnv_pci_ioda2_setup_default_config()
1429 res_end = min(window_size, SZ_4G) >> tbl->it_page_shift; in pnv_pci_ioda2_setup_default_config()
1432 tbl->it_index = (pe->phb->hose->global_number << 16) | pe->pe_number; in pnv_pci_ioda2_setup_default_config()
1433 if (iommu_init_table(tbl, pe->phb->hose->node, res_start, res_end)) in pnv_pci_ioda2_setup_default_config()
1434 rc = pnv_pci_ioda2_set_window(&pe->table_group, 0, tbl); in pnv_pci_ioda2_setup_default_config()
1439 iommu_tce_table_put(tbl); in pnv_pci_ioda2_setup_default_config()
1440 tbl = NULL; /* This clears iommu_table_base below */ in pnv_pci_ioda2_setup_default_config()
1451 set_iommu_table_base(&pe->pdev->dev, tbl); in pnv_pci_ioda2_setup_default_config()
1545 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_ioda2_take_ownership() local
1551 if (!tbl) in pnv_ioda2_take_ownership()
1560 iommu_tce_table_put(tbl); in pnv_ioda2_take_ownership()
2357 struct iommu_table *tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_pe_dma() local
2373 iommu_tce_table_put(tbl); in pnv_pci_ioda2_release_pe_dma()