/openbmc/linux/drivers/vfio/ |
H A D | vfio_iommu_spapr_tce.c | 242 struct iommu_table_group *table_group; in tce_iommu_enable() local 282 table_group = iommu_group_get_iommudata(tcegrp->grp); in tce_iommu_enable() 283 if (!table_group) in tce_iommu_enable() 286 if (!table_group->tce32_size) in tce_iommu_enable() 293 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 …]
|
/openbmc/linux/arch/powerpc/platforms/pseries/ |
H A D | iommu.c | 72 struct iommu_table_group *table_group; in iommu_pseries_alloc_group() local 74 table_group = kzalloc_node(sizeof(*table_group), GFP_KERNEL, node); in iommu_pseries_alloc_group() 75 if (!table_group) in iommu_pseries_alloc_group() 79 table_group->ops = &spapr_tce_table_group_ops; in iommu_pseries_alloc_group() 80 table_group->pgsizes = SZ_4K; in iommu_pseries_alloc_group() 83 table_group->tables[0] = iommu_pseries_alloc_table(node); in iommu_pseries_alloc_group() 84 if (table_group->tables[0]) in iommu_pseries_alloc_group() 85 return table_group; in iommu_pseries_alloc_group() 87 kfree(table_group); in iommu_pseries_alloc_group() 91 static void iommu_pseries_free_group(struct iommu_table_group *table_group, in iommu_pseries_free_group() argument [all …]
|
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | iommu.h | 169 long (*create_table)(struct iommu_table_group *table_group, 175 long (*set_window)(struct iommu_table_group *table_group, 178 long (*unset_window)(struct iommu_table_group *table_group, 181 long (*take_ownership)(struct iommu_table_group *table_group); 183 void (*release_ownership)(struct iommu_table_group *table_group); 189 struct iommu_table_group *table_group; member 207 extern void iommu_register_group(struct iommu_table_group *table_group, 209 extern int iommu_add_device(struct iommu_table_group *table_group, 223 static inline void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument 229 static inline int iommu_add_device(struct iommu_table_group *table_group, in iommu_add_device() argument
|
H A D | pci-bridge.h | 213 struct iommu_table_group *table_group; /* for phb's or bridges */ member
|
/openbmc/linux/arch/powerpc/platforms/powernv/ |
H A D | pci-ioda-tce.c | 371 struct iommu_table_group *table_group) in pnv_pci_unlink_table_and_group() argument 377 if (!tbl || !table_group) in pnv_pci_unlink_table_and_group() 385 if (tgl->table_group == table_group) { in pnv_pci_unlink_table_and_group() 400 if (table_group->tables[i] == tbl) { in pnv_pci_unlink_table_and_group() 402 table_group->tables[i] = NULL; in pnv_pci_unlink_table_and_group() 412 struct iommu_table_group *table_group) in pnv_pci_link_table_and_group() argument 416 if (WARN_ON(!tbl || !table_group)) in pnv_pci_link_table_and_group() 424 tgl->table_group = table_group; in pnv_pci_link_table_and_group() 427 table_group->tables[num] = iommu_tce_table_get(tbl); in pnv_pci_link_table_and_group()
|
H A D | pci-ioda.c | 1042 set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]); in pnv_pci_ioda_dma_dev_setup() 1045 if (pe->table_group.group) in pnv_pci_ioda_dma_dev_setup() 1046 iommu_add_device(&pe->table_group, &pdev->dev); in pnv_pci_ioda_dma_dev_setup() 1227 struct pnv_ioda_pe *pe = container_of(tgl->table_group, in pnv_pci_ioda2_tce_invalidate() 1228 struct pnv_ioda_pe, table_group); in pnv_pci_ioda2_tce_invalidate() 1277 static long pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, in pnv_pci_ioda2_set_window() argument 1280 struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe, in pnv_pci_ioda2_set_window() 1281 table_group); in pnv_pci_ioda2_set_window() 1310 tbl, &pe->table_group); in pnv_pci_ioda2_set_window() 1344 static long pnv_pci_ioda2_create_table(struct iommu_table_group *table_group, in pnv_pci_ioda2_create_table() argument [all …]
|
H A D | pci.h | 79 struct iommu_table_group table_group; member 321 struct iommu_table_group *table_group); 323 struct iommu_table_group *table_group);
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | iommu.c | 995 struct iommu_table_group *table_group = iommu_data; in group_release() local 997 table_group->group = NULL; in group_release() 1000 void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument 1012 table_group->group = grp; in iommu_register_group() 1013 iommu_group_set_iommudata(grp, table_group, group_release); in iommu_register_group() 1157 int iommu_add_device(struct iommu_table_group *table_group, struct device *dev) in iommu_add_device() argument 1175 __func__, dev_name(dev), iommu_group_id(table_group->group)); in iommu_add_device() 1205 static long spapr_tce_create_table(struct iommu_table_group *table_group, int num, in spapr_tce_create_table() argument 1209 struct iommu_table *tbl = table_group->tables[0]; in spapr_tce_create_table() 1223 static long spapr_tce_set_window(struct iommu_table_group *table_group, in spapr_tce_set_window() argument [all …]
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | book3s_64_vio.c | 86 struct iommu_table_group *table_group = NULL; in kvm_spapr_tce_release_iommu_group() local 91 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_release_iommu_group() 92 if (WARN_ON(!table_group)) in kvm_spapr_tce_release_iommu_group() 97 if (table_group->tables[i] != stit->tbl) in kvm_spapr_tce_release_iommu_group() 114 struct iommu_table_group *table_group; in kvm_spapr_tce_attach_iommu_group() local 137 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_attach_iommu_group() 138 if (WARN_ON(!table_group)) { in kvm_spapr_tce_attach_iommu_group() 144 struct iommu_table *tbltmp = table_group->tables[i]; in kvm_spapr_tce_attach_iommu_group()
|