/Linux-v5.10/arch/powerpc/platforms/powernv/ |
D | npu-dma.c | 125 static long pnv_npu_unset_window(struct iommu_table_group *table_group, 128 static long pnv_npu_set_window(struct iommu_table_group *table_group, int num, in pnv_npu_set_window() argument 131 struct pnv_ioda_pe *npe = container_of(table_group, struct pnv_ioda_pe, in pnv_npu_set_window() 132 table_group); in pnv_npu_set_window() 142 if (npe->table_group.tables[num2]) in pnv_npu_set_window() 143 pnv_npu_unset_window(&npe->table_group, num2); in pnv_npu_set_window() 164 tbl, &npe->table_group); in pnv_npu_set_window() 169 static long pnv_npu_unset_window(struct iommu_table_group *table_group, int num) in pnv_npu_unset_window() argument 171 struct pnv_ioda_pe *npe = container_of(table_group, struct pnv_ioda_pe, in pnv_npu_unset_window() 172 table_group); in pnv_npu_unset_window() [all …]
|
D | pci-ioda-tce.c | 372 struct iommu_table_group *table_group) in pnv_pci_unlink_table_and_group() argument 378 if (!tbl || !table_group) in pnv_pci_unlink_table_and_group() 384 if (tgl->table_group == table_group) { in pnv_pci_unlink_table_and_group() 397 if (table_group->tables[i] == tbl) { in pnv_pci_unlink_table_and_group() 399 table_group->tables[i] = NULL; in pnv_pci_unlink_table_and_group() 409 struct iommu_table_group *table_group) in pnv_pci_link_table_and_group() argument 413 if (WARN_ON(!tbl || !table_group)) in pnv_pci_link_table_and_group() 421 tgl->table_group = table_group; in pnv_pci_link_table_and_group() 424 table_group->tables[num] = iommu_tce_table_get(tbl); in pnv_pci_link_table_and_group()
|
D | pci-ioda.c | 1264 set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]); in pnv_pci_ioda_dma_dev_setup() 1267 if (pe->table_group.group) in pnv_pci_ioda_dma_dev_setup() 1268 iommu_add_device(&pe->table_group, &pdev->dev); in pnv_pci_ioda_dma_dev_setup() 1393 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_p7ioc_tce_invalidate() 1394 struct pnv_ioda_pe, table_group); in pnv_pci_p7ioc_tce_invalidate() 1537 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda2_tce_invalidate() 1538 struct pnv_ioda_pe, table_group); in pnv_pci_ioda2_tce_invalidate() 1710 iommu_register_group(&pe->table_group, phb->hose->global_number, in pnv_pci_ioda1_setup_dma_pe() 1712 pnv_pci_link_table_and_group(phb->hose->node, 0, tbl, &pe->table_group); in pnv_pci_ioda1_setup_dma_pe() 1763 pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe() [all …]
|
D | pci.h | 83 struct iommu_table_group table_group; member 345 struct iommu_table_group *table_group); 347 struct iommu_table_group *table_group);
|
/Linux-v5.10/drivers/vfio/ |
D | vfio_iommu_spapr_tce.c | 240 struct iommu_table_group *table_group; in tce_iommu_enable() local 280 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable() 281 if (!table_group) in tce_iommu_enable() 284 if (!table_group->tce32_size) in tce_iommu_enable() 291 locked = table_group->tce32_size >> PAGE_SHIFT; in tce_iommu_enable() 607 struct iommu_table_group *table_group, in tce_iommu_create_table() argument 616 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table() 625 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table() 648 struct iommu_table_group *table_group; in tce_iommu_create_window() local 659 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_create_window() [all …]
|
/Linux-v5.10/arch/powerpc/platforms/pseries/ |
D | iommu.c | 58 struct iommu_table_group *table_group; in iommu_pseries_alloc_group() local 61 table_group = kzalloc_node(sizeof(struct iommu_table_group), GFP_KERNEL, in iommu_pseries_alloc_group() 63 if (!table_group) in iommu_pseries_alloc_group() 73 table_group->tables[0] = tbl; in iommu_pseries_alloc_group() 75 return table_group; in iommu_pseries_alloc_group() 78 kfree(table_group); in iommu_pseries_alloc_group() 82 static void iommu_pseries_free_group(struct iommu_table_group *table_group, in iommu_pseries_free_group() argument 87 if (!table_group) in iommu_pseries_free_group() 90 tbl = table_group->tables[0]; in iommu_pseries_free_group() 92 if (table_group->group) { in iommu_pseries_free_group() [all …]
|
/Linux-v5.10/arch/powerpc/include/asm/ |
D | iommu.h | 167 long (*create_table)(struct iommu_table_group *table_group, 173 long (*set_window)(struct iommu_table_group *table_group, 176 long (*unset_window)(struct iommu_table_group *table_group, 179 void (*take_ownership)(struct iommu_table_group *table_group); 181 void (*release_ownership)(struct iommu_table_group *table_group); 187 struct iommu_table_group *table_group; member 205 extern void iommu_register_group(struct iommu_table_group *table_group, 207 extern int iommu_add_device(struct iommu_table_group *table_group, 220 static inline void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument 226 static inline int iommu_add_device(struct iommu_table_group *table_group, in iommu_add_device() argument
|
D | pci-bridge.h | 196 struct iommu_table_group *table_group; /* for phb's or bridges */ member
|
/Linux-v5.10/arch/powerpc/kvm/ |
D | book3s_64_vio.c | 74 struct iommu_table_group *table_group = NULL; in kvm_spapr_tce_release_iommu_group() local 79 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_release_iommu_group() 80 if (WARN_ON(!table_group)) in kvm_spapr_tce_release_iommu_group() 85 if (table_group->tables[i] != stit->tbl) in kvm_spapr_tce_release_iommu_group() 102 struct iommu_table_group *table_group; in kvm_spapr_tce_attach_iommu_group() local 125 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_attach_iommu_group() 126 if (WARN_ON(!table_group)) in kvm_spapr_tce_attach_iommu_group() 130 struct iommu_table *tbltmp = table_group->tables[i]; in kvm_spapr_tce_attach_iommu_group()
|
/Linux-v5.10/arch/powerpc/kernel/ |
D | iommu.c | 927 struct iommu_table_group *table_group = iommu_data; in group_release() local 929 table_group->group = NULL; in group_release() 932 void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument 944 table_group->group = grp; in iommu_register_group() 945 iommu_group_set_iommudata(grp, table_group, group_release); in iommu_register_group() 1094 int iommu_add_device(struct iommu_table_group *table_group, struct device *dev) in iommu_add_device() argument 1112 __func__, dev_name(dev), iommu_group_id(table_group->group)); in iommu_add_device() 1114 return iommu_group_add_device(table_group->group, dev); in iommu_add_device()
|