Home
last modified time | relevance | path

Searched refs:table_group (Results 1 – 10 of 10) sorted by relevance

/Linux-v4.19/drivers/vfio/
Dvfio_iommu_spapr_tce.c268 struct iommu_table_group *table_group; in tce_iommu_enable() local
308 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable()
309 if (!table_group) in tce_iommu_enable()
312 if (!table_group->tce32_size) in tce_iommu_enable()
319 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable()
612 struct iommu_table_group *table_group, in tce_iommu_create_table() argument
621 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table()
630 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table()
653 struct iommu_table_group *table_group; in tce_iommu_create_window() local
664 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window()
[all …]
/Linux-v4.19/arch/powerpc/platforms/pseries/
Diommu.c58 struct iommu_table_group *table_group; in iommu_pseries_alloc_group() local
62 table_group = kzalloc_node(sizeof(struct iommu_table_group), GFP_KERNEL, in iommu_pseries_alloc_group()
64 if (!table_group) in iommu_pseries_alloc_group()
78 tgl->table_group = table_group; in iommu_pseries_alloc_group()
81 table_group->tables[0] = tbl; in iommu_pseries_alloc_group()
83 return table_group; in iommu_pseries_alloc_group()
88 kfree(table_group); in iommu_pseries_alloc_group()
92 static void iommu_pseries_free_group(struct iommu_table_group *table_group, in iommu_pseries_free_group() argument
100 if (!table_group) in iommu_pseries_free_group()
103 tbl = table_group->tables[0]; in iommu_pseries_free_group()
[all …]
/Linux-v4.19/arch/powerpc/platforms/powernv/
Dpci-ioda-tce.c345 struct iommu_table_group *table_group) in pnv_pci_unlink_table_and_group() argument
351 if (!tbl || !table_group) in pnv_pci_unlink_table_and_group()
357 if (tgl->table_group == table_group) { in pnv_pci_unlink_table_and_group()
370 if (table_group->tables[i] == tbl) { in pnv_pci_unlink_table_and_group()
371 table_group->tables[i] = NULL; in pnv_pci_unlink_table_and_group()
381 struct iommu_table_group *table_group) in pnv_pci_link_table_and_group() argument
385 if (WARN_ON(!tbl || !table_group)) in pnv_pci_link_table_and_group()
393 tgl->table_group = table_group; in pnv_pci_link_table_and_group()
396 table_group->tables[num] = tbl; in pnv_pci_link_table_and_group()
Dpci-ioda.c1438 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group,
1446 tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_dma_pe()
1447 rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_pci_ioda2_release_dma_pe()
1452 if (pe->table_group.group) { in pnv_pci_ioda2_release_dma_pe()
1453 iommu_group_put(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1454 BUG_ON(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1740 set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]); in pnv_pci_ioda_dma_dev_setup()
1934 set_iommu_table_base(&dev->dev, pe->table_group.tables[0]); in pnv_ioda_setup_bus_dma()
1958 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_p7ioc_tce_invalidate()
1959 struct pnv_ioda_pe, table_group); in pnv_pci_p7ioc_tce_invalidate()
[all …]
Dpci.h67 struct iommu_table_group table_group; member
267 struct iommu_table_group *table_group);
269 struct iommu_table_group *table_group);
Dnpu-dma.c230 tbl, &npe->table_group); in pnv_npu_set_window()
252 pnv_pci_unlink_table_and_group(npe->table_group.tables[num], in pnv_npu_unset_window()
253 &npe->table_group); in pnv_npu_unset_window()
278 rc = pnv_npu_set_window(npe, 0, gpe->table_group.tables[0]); in pnv_npu_dma_set_32()
367 if (npe->table_group.tables[0]) { in pnv_npu_take_ownership()
400 iommu_group_add_device(gpe->table_group.group, &npdev->dev); in pnv_pci_npu_setup_iommu()
/Linux-v4.19/arch/powerpc/include/asm/
Diommu.h178 long (*create_table)(struct iommu_table_group *table_group,
184 long (*set_window)(struct iommu_table_group *table_group,
187 long (*unset_window)(struct iommu_table_group *table_group,
190 void (*take_ownership)(struct iommu_table_group *table_group);
192 void (*release_ownership)(struct iommu_table_group *table_group);
198 struct iommu_table_group *table_group; member
216 extern void iommu_register_group(struct iommu_table_group *table_group,
224 static inline void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument
Dpci-bridge.h197 struct iommu_table_group *table_group; /* for phb's or bridges */ member
/Linux-v4.19/arch/powerpc/kvm/
Dbook3s_64_vio.c122 struct iommu_table_group *table_group = NULL; in kvm_spapr_tce_release_iommu_group() local
126 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_release_iommu_group()
127 if (WARN_ON(!table_group)) in kvm_spapr_tce_release_iommu_group()
132 if (table_group->tables[i] != stit->tbl) in kvm_spapr_tce_release_iommu_group()
148 struct iommu_table_group *table_group; in kvm_spapr_tce_attach_iommu_group() local
169 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_attach_iommu_group()
170 if (WARN_ON(!table_group)) in kvm_spapr_tce_attach_iommu_group()
174 struct iommu_table *tbltmp = table_group->tables[i]; in kvm_spapr_tce_attach_iommu_group()
/Linux-v4.19/arch/powerpc/kernel/
Diommu.c914 struct iommu_table_group *table_group = iommu_data; in group_release() local
916 table_group->group = NULL; in group_release()
919 void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument
931 table_group->group = grp; in iommu_register_group()
932 iommu_group_set_iommudata(grp, table_group, group_release); in iommu_register_group()
1112 iommu_group_id(tgl->table_group->group)); in iommu_add_device()
1121 return iommu_group_add_device(tgl->table_group->group, dev); in iommu_add_device()