/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
H A 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() 198 pnv_npu_take_ownership(struct iommu_table_group *table_group) pnv_npu_take_ownership() argument 232 pnv_npu_release_ownership(struct iommu_table_group *table_group) pnv_npu_release_ownership() argument 263 struct iommu_table_group table_group; global() member 275 pnv_npu_peers_create_table_userspace( struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, struct iommu_table **ptbl) pnv_npu_peers_create_table_userspace() argument 293 pnv_npu_peers_set_window(struct iommu_table_group *table_group, int num, struct iommu_table *tbl) pnv_npu_peers_set_window() argument 332 pnv_npu_peers_unset_window(struct iommu_table_group *table_group, int num) pnv_npu_peers_unset_window() argument 379 pnv_npu_peers_take_ownership(struct iommu_table_group *table_group) pnv_npu_peers_take_ownership() argument 395 pnv_npu_peers_release_ownership( struct iommu_table_group *table_group) pnv_npu_peers_release_ownership() argument 500 struct iommu_table_group *table_group; pnv_npu_compound_attach() local [all...] |
H A 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 in pnv_pci_ioda1_setup_dma_pe() 1779 pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, int num, struct iommu_table *tbl) pnv_pci_ioda2_set_window() argument 1846 pnv_pci_ioda2_create_table(struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, bool alloc_userspace_copy, struct iommu_table **ptbl) pnv_pci_ioda2_create_table() argument 1957 pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group, int num) pnv_pci_ioda2_unset_window() argument 2014 pnv_pci_ioda2_create_table_userspace( struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, struct iommu_table **ptbl) pnv_pci_ioda2_create_table_userspace() argument 2041 pnv_ioda2_take_ownership(struct iommu_table_group *table_group) pnv_ioda2_take_ownership() argument 2057 pnv_ioda2_release_ownership(struct iommu_table_group *table_group) pnv_ioda2_release_ownership() argument 2645 pnv_pci_ioda1_unset_window(struct iommu_table_group *table_group, int num) pnv_pci_ioda1_unset_window() argument [all...] |
H A D | pci-ioda-tce.c | 372 struct iommu_table_group *table_group) in pnv_pci_unlink_table_and_group() 378 if (!tbl || !table_group) in pnv_pci_unlink_table_and_group() 386 if (tgl->table_group == table_group) { in pnv_pci_unlink_table_and_group() 401 if (table_group->tables[i] == tbl) { in pnv_pci_unlink_table_and_group() 403 table_group->tables[i] = NULL; in pnv_pci_unlink_table_and_group() 413 struct iommu_table_group *table_group) in pnv_pci_link_table_and_group() 417 if (WARN_ON(!tbl || !table_group)) in pnv_pci_link_table_and_group() 425 tgl->table_group = table_group; in pnv_pci_link_table_and_group() 371 pnv_pci_unlink_table_and_group(struct iommu_table *tbl, struct iommu_table_group *table_group) pnv_pci_unlink_table_and_group() argument 411 pnv_pci_link_table_and_group(int node, int num, struct iommu_table *tbl, struct iommu_table_group *table_group) pnv_pci_link_table_and_group() argument [all...] |
H A 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);
|
/kernel/linux/linux-5.10/drivers/vfio/ |
H A 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() 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 606 tce_iommu_create_table(struct tce_container *container, struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, struct iommu_table **ptbl) tce_iommu_create_table() argument 711 struct iommu_table_group *table_group = NULL; tce_iommu_remove_window() local 752 struct iommu_table_group *table_group; tce_iommu_create_default_window() local 810 struct iommu_table_group *table_group; tce_iommu_ioctl() local 1141 tce_iommu_release_ownership(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_release_ownership() argument 1160 tce_iommu_take_ownership(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_take_ownership() argument 1187 tce_iommu_release_ownership_ddw(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_release_ownership_ddw() argument 1204 tce_iommu_take_ownership_ddw(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_take_ownership_ddw() argument 1245 struct iommu_table_group *table_group; tce_iommu_attach_group() local 1328 struct iommu_table_group *table_group; tce_iommu_detach_group() local [all...] |
/kernel/linux/linux-6.6/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() 608 struct iommu_table_group *table_group, in tce_iommu_create_table() 617 table_size = table_group->ops->get_table_size(page_shift, window_size, in tce_iommu_create_table() 626 ret = table_group->ops->create_table(table_group, num, in tce_iommu_create_table() 649 struct iommu_table_group *table_group; in tce_iommu_create_window() local 607 tce_iommu_create_table(struct tce_container *container, struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, struct iommu_table **ptbl) tce_iommu_create_table() argument 712 struct iommu_table_group *table_group = NULL; tce_iommu_remove_window() local 753 struct iommu_table_group *table_group; tce_iommu_create_default_window() local 860 struct iommu_table_group *table_group; tce_iommu_ioctl() local 1190 tce_iommu_release_ownership(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_release_ownership() argument 1205 tce_iommu_take_ownership(struct tce_container *container, struct iommu_table_group *table_group) tce_iommu_take_ownership() argument 1236 struct iommu_table_group *table_group; tce_iommu_attach_group() local 1316 struct iommu_table_group *table_group; tce_iommu_detach_group() local [all...] |
/kernel/linux/linux-5.10/arch/powerpc/platforms/pseries/ |
H A 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 in iommu_pseries_free_group() 544 iommu_table_setparms_lpar(struct pci_controller *phb, struct device_node *dn, struct iommu_table *tbl, struct iommu_table_group *table_group, const __be32 *dma_window) iommu_table_setparms_lpar() argument [all...] |
/kernel/linux/linux-6.6/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 iommu_pseries_free_group(struct iommu_table_group *table_group, const char *node_name) iommu_pseries_free_group() argument [all...] |
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
H A 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 [all...] |
H A D | pci-bridge.h | 196 struct iommu_table_group *table_group; /* for phb's or bridges */ member
|
/kernel/linux/linux-6.6/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 [all...] |
H A D | pci-bridge.h | 213 struct iommu_table_group *table_group; /* for phb's or bridges */ member
|
/kernel/linux/linux-6.6/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() 1192 * one if it matches table_group->tce32_start/tce32_size/page_shift. 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 in spapr_tce_create_table() 1223 spapr_tce_set_window(struct iommu_table_group *table_group, int num, struct iommu_table *tbl) spapr_tce_set_window() argument 1229 spapr_tce_unset_window(struct iommu_table_group *table_group, int num) spapr_tce_unset_window() argument 1234 spapr_tce_take_ownership(struct iommu_table_group *table_group) spapr_tce_take_ownership() argument 1255 spapr_tce_release_ownership(struct iommu_table_group *table_group) spapr_tce_release_ownership() argument 1287 struct iommu_table_group *table_group; spapr_tce_blocking_iommu_attach_dev() local 1303 struct iommu_table_group *table_group; spapr_tce_blocking_iommu_set_platform_dma() local [all...] |
/kernel/linux/linux-6.6/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() 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() 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() 370 pnv_pci_unlink_table_and_group(struct iommu_table *tbl, struct iommu_table_group *table_group) pnv_pci_unlink_table_and_group() argument 410 pnv_pci_link_table_and_group(int node, int num, struct iommu_table *tbl, struct iommu_table_group *table_group) pnv_pci_link_table_and_group() argument [all...] |
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 1456 pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group, int num) pnv_pci_ioda2_unset_window() argument 1513 pnv_pci_ioda2_create_table_userspace( struct iommu_table_group *table_group, int num, __u32 page_shift, __u64 window_size, __u32 levels, struct iommu_table **ptbl) pnv_pci_ioda2_create_table_userspace() argument 1540 pnv_ioda2_take_ownership(struct iommu_table_group *table_group) pnv_ioda2_take_ownership() argument 1565 pnv_ioda2_release_ownership(struct iommu_table_group *table_group) pnv_ioda2_release_ownership() 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);
|
/kernel/linux/linux-5.10/arch/powerpc/kvm/ |
H A 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()
|
/kernel/linux/linux-5.10/arch/powerpc/kernel/ |
H A D | iommu.c | 938 struct iommu_table_group *table_group = iommu_data; in group_release() local 940 table_group->group = NULL; in group_release() 943 void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument 955 table_group->group = grp; in iommu_register_group() 956 iommu_group_set_iommudata(grp, table_group, group_release); in iommu_register_group() 1105 int iommu_add_device(struct iommu_table_group *table_group, struct device *dev) in iommu_add_device() argument 1123 __func__, dev_name(dev), iommu_group_id(table_group->group)); in iommu_add_device() 1125 return iommu_group_add_device(table_group->group, dev); in iommu_add_device()
|
/kernel/linux/linux-6.6/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() 142 struct iommu_table *tbltmp = table_group->tables[i]; in kvm_spapr_tce_attach_iommu_group()
|