Home
last modified time | relevance | path

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

/Linux-v5.4/arch/powerpc/platforms/powernv/
Dnpu-dma.c124 static long pnv_npu_unset_window(struct iommu_table_group *table_group,
127 static long pnv_npu_set_window(struct iommu_table_group *table_group, int num, in pnv_npu_set_window() argument
130 struct pnv_ioda_pe *npe = container_of(table_group, struct pnv_ioda_pe, in pnv_npu_set_window()
131 table_group); in pnv_npu_set_window()
141 if (npe->table_group.tables[num2]) in pnv_npu_set_window()
142 pnv_npu_unset_window(&npe->table_group, num2); in pnv_npu_set_window()
163 tbl, &npe->table_group); in pnv_npu_set_window()
168 static long pnv_npu_unset_window(struct iommu_table_group *table_group, int num) in pnv_npu_unset_window() argument
170 struct pnv_ioda_pe *npe = container_of(table_group, struct pnv_ioda_pe, in pnv_npu_unset_window()
171 table_group); in pnv_npu_unset_window()
[all …]
Dpci-ioda-tce.c352 struct iommu_table_group *table_group) in pnv_pci_unlink_table_and_group() argument
358 if (!tbl || !table_group) in pnv_pci_unlink_table_and_group()
364 if (tgl->table_group == table_group) { in pnv_pci_unlink_table_and_group()
377 if (table_group->tables[i] == tbl) { in pnv_pci_unlink_table_and_group()
379 table_group->tables[i] = NULL; in pnv_pci_unlink_table_and_group()
389 struct iommu_table_group *table_group) in pnv_pci_link_table_and_group() argument
393 if (WARN_ON(!tbl || !table_group)) in pnv_pci_link_table_and_group()
401 tgl->table_group = table_group; in pnv_pci_link_table_and_group()
404 table_group->tables[num] = iommu_tce_table_get(tbl); in pnv_pci_link_table_and_group()
Dpci-ioda.c1439 static long pnv_pci_ioda2_unset_window(struct iommu_table_group *table_group,
1447 tbl = pe->table_group.tables[0]; in pnv_pci_ioda2_release_dma_pe()
1448 rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0); in pnv_pci_ioda2_release_dma_pe()
1453 if (pe->table_group.group) { in pnv_pci_ioda2_release_dma_pe()
1454 iommu_group_put(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1455 BUG_ON(pe->table_group.group); in pnv_pci_ioda2_release_dma_pe()
1538 struct iommu_table_group *table_group, struct pci_bus *bus);
1595 iommu_register_group(&pe->table_group, in pnv_ioda_setup_vf_PE()
1597 pnv_ioda_setup_bus_iommu_group(pe, &pe->table_group, NULL); in pnv_ioda_setup_vf_PE()
1751 set_iommu_table_base(&pdev->dev, pe->table_group.tables[0]); in pnv_pci_ioda_dma_dev_setup()
[all …]
Dpci.h65 struct iommu_table_group table_group; member
243 struct iommu_table_group *table_group);
245 struct iommu_table_group *table_group);
Dpci.c1002 if (!pe->table_group.group) in pnv_tce_iommu_bus_notifier()
1004 iommu_add_device(&pe->table_group, dev); in pnv_tce_iommu_bus_notifier()
/Linux-v5.4/drivers/vfio/
Dvfio_iommu_spapr_tce.c240 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.4/arch/powerpc/platforms/pseries/
Diommu.c45 struct iommu_table_group *table_group; in iommu_pseries_alloc_group() local
48 table_group = kzalloc_node(sizeof(struct iommu_table_group), GFP_KERNEL, in iommu_pseries_alloc_group()
50 if (!table_group) in iommu_pseries_alloc_group()
60 table_group->tables[0] = tbl; in iommu_pseries_alloc_group()
62 return table_group; in iommu_pseries_alloc_group()
65 kfree(table_group); in iommu_pseries_alloc_group()
69 static void iommu_pseries_free_group(struct iommu_table_group *table_group, in iommu_pseries_free_group() argument
74 if (!table_group) in iommu_pseries_free_group()
77 tbl = table_group->tables[0]; in iommu_pseries_free_group()
79 if (table_group->group) { in iommu_pseries_free_group()
[all …]
/Linux-v5.4/arch/powerpc/include/asm/
Diommu.h167 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
Dpci-bridge.h196 struct iommu_table_group *table_group; /* for phb's or bridges */ member
/Linux-v5.4/arch/powerpc/kvm/
Dbook3s_64_vio.c75 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()
100 struct iommu_table_group *table_group; in kvm_spapr_tce_attach_iommu_group() local
121 table_group = iommu_group_get_iommudata(grp); in kvm_spapr_tce_attach_iommu_group()
122 if (WARN_ON(!table_group)) in kvm_spapr_tce_attach_iommu_group()
126 struct iommu_table *tbltmp = table_group->tables[i]; in kvm_spapr_tce_attach_iommu_group()
/Linux-v5.4/arch/powerpc/kernel/
Diommu.c934 struct iommu_table_group *table_group = iommu_data; in group_release() local
936 table_group->group = NULL; in group_release()
939 void iommu_register_group(struct iommu_table_group *table_group, in iommu_register_group() argument
951 table_group->group = grp; in iommu_register_group()
952 iommu_group_set_iommudata(grp, table_group, group_release); in iommu_register_group()
1101 int iommu_add_device(struct iommu_table_group *table_group, struct device *dev) in iommu_add_device() argument
1119 __func__, dev_name(dev), iommu_group_id(table_group->group)); in iommu_add_device()
1121 return iommu_group_add_device(table_group->group, dev); in iommu_add_device()