/kernel/linux/linux-5.10/arch/powerpc/kvm/ |
H A D | book3s_64_vio.c | 32 #include <asm/tce.h> 324 ret = anon_inode_getfd("kvm-spapr-tce", &kvm_spapr_tce_fops, in kvm_vm_ioctl_create_spapr_tce() 343 static long kvmppc_tce_to_ua(struct kvm *kvm, unsigned long tce, in kvmppc_tce_to_ua() argument 346 unsigned long gfn = tce >> PAGE_SHIFT; in kvmppc_tce_to_ua() 354 (tce & ~(PAGE_MASK | TCE_PCI_READ | TCE_PCI_WRITE)); in kvmppc_tce_to_ua() 360 unsigned long tce) in kvmppc_tce_validate() 362 unsigned long gpa = tce & ~(TCE_PCI_READ | TCE_PCI_WRITE); in kvmppc_tce_validate() 363 enum dma_data_direction dir = iommu_tce_direction(tce); in kvmppc_tce_validate() 374 if (kvmppc_tce_to_ua(stt->kvm, tce, &ua)) in kvmppc_tce_validate() 400 unsigned long idx, unsigned long tce) in kvmppc_tce_put() 359 kvmppc_tce_validate(struct kvmppc_spapr_tce_table *stt, unsigned long tce) kvmppc_tce_validate() argument 399 kvmppc_tce_put(struct kvmppc_spapr_tce_table *stt, unsigned long idx, unsigned long tce) kvmppc_tce_put() argument 561 kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn, unsigned long ioba, unsigned long tce) kvmppc_h_put_tce() argument 628 u64 tce; kvmppc_h_put_tce_indirect() local [all...] |
H A D | book3s_64_vio_hv.c | 29 #include <asm/tce.h> 78 unsigned long tce, unsigned long *ua) in kvmppc_rm_tce_to_ua() 80 unsigned long gfn = tce >> PAGE_SHIFT; in kvmppc_rm_tce_to_ua() 88 (tce & ~(PAGE_MASK | TCE_PCI_READ | TCE_PCI_WRITE)); in kvmppc_rm_tce_to_ua() 102 unsigned long tce) in kvmppc_rm_tce_validate() 104 unsigned long gpa = tce & ~(TCE_PCI_READ | TCE_PCI_WRITE); in kvmppc_rm_tce_validate() 105 enum dma_data_direction dir = iommu_tce_direction(tce); in kvmppc_rm_tce_validate() 116 if (kvmppc_rm_tce_to_ua(stt->kvm, tce, &ua)) in kvmppc_rm_tce_validate() 168 unsigned long idx, unsigned long tce) in kvmppc_rm_tce_put() 180 WARN_ON_ONCE_RM(tce ! in kvmppc_rm_tce_put() 77 kvmppc_rm_tce_to_ua(struct kvm *kvm, unsigned long tce, unsigned long *ua) kvmppc_rm_tce_to_ua() argument 101 kvmppc_rm_tce_validate(struct kvmppc_spapr_tce_table *stt, unsigned long tce) kvmppc_rm_tce_validate() argument 167 kvmppc_rm_tce_put(struct kvmppc_spapr_tce_table *stt, unsigned long idx, unsigned long tce) kvmppc_rm_tce_put() argument 395 kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn, unsigned long ioba, unsigned long tce) kvmppc_rm_h_put_tce() argument 567 unsigned long tce = be64_to_cpu(((u64 *)tces)[i]); kvmppc_rm_h_put_tce_indirect() local 575 unsigned long tce = be64_to_cpu(((u64 *)tces)[i]); kvmppc_rm_h_put_tce_indirect() local [all...] |
H A D | book3s_pr_papr.c | 289 unsigned long tce = kvmppc_get_gpr(vcpu, 6); in kvmppc_h_pr_put_tce() local 292 rc = kvmppc_h_put_tce(vcpu, liobn, ioba, tce); in kvmppc_h_pr_put_tce() 303 unsigned long tce = kvmppc_get_gpr(vcpu, 6); in kvmppc_h_pr_put_tce_indirect() local 308 tce, npages); in kvmppc_h_pr_put_tce_indirect()
|
/kernel/linux/linux-6.6/arch/powerpc/kvm/ |
H A D | book3s_64_vio.c | 32 #include <asm/tce.h> 335 ret = anon_inode_getfd("kvm-spapr-tce", &kvm_spapr_tce_fops, in kvm_vm_ioctl_create_spapr_tce() 354 static long kvmppc_tce_to_ua(struct kvm *kvm, unsigned long tce, in kvmppc_tce_to_ua() argument 357 unsigned long gfn = tce >> PAGE_SHIFT; in kvmppc_tce_to_ua() 365 (tce & ~(PAGE_MASK | TCE_PCI_READ | TCE_PCI_WRITE)); in kvmppc_tce_to_ua() 371 unsigned long tce) in kvmppc_tce_validate() 373 unsigned long gpa = tce & ~(TCE_PCI_READ | TCE_PCI_WRITE); in kvmppc_tce_validate() 374 enum dma_data_direction dir = iommu_tce_direction(tce); in kvmppc_tce_validate() 385 if (kvmppc_tce_to_ua(stt->kvm, tce, &ua)) in kvmppc_tce_validate() 411 unsigned long idx, unsigned long tce) in kvmppc_tce_put() 370 kvmppc_tce_validate(struct kvmppc_spapr_tce_table *stt, unsigned long tce) kvmppc_tce_validate() argument 410 kvmppc_tce_put(struct kvmppc_spapr_tce_table *stt, unsigned long idx, unsigned long tce) kvmppc_tce_put() argument 572 kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn, unsigned long ioba, unsigned long tce) kvmppc_h_put_tce() argument 639 u64 tce; kvmppc_h_put_tce_indirect() local [all...] |
H A D | book3s_pr_papr.c | 305 unsigned long tce = kvmppc_get_gpr(vcpu, 6); in kvmppc_h_pr_put_tce() local 308 rc = kvmppc_h_put_tce(vcpu, liobn, ioba, tce); in kvmppc_h_pr_put_tce() 319 unsigned long tce = kvmppc_get_gpr(vcpu, 6); in kvmppc_h_pr_put_tce_indirect() local 324 tce, npages); in kvmppc_h_pr_put_tce_indirect()
|
/kernel/linux/linux-5.10/drivers/vfio/ |
H A D | vfio_iommu_spapr_tce.c | 25 #include <asm/tce.h> 390 unsigned long tce, unsigned long shift, in tce_iommu_prereg_ua_to_hpa() 396 mem = mm_iommu_lookup(container->mm, tce, 1ULL << shift); in tce_iommu_prereg_ua_to_hpa() 400 ret = mm_iommu_ua_to_hpa(mem, tce, shift, phpa); in tce_iommu_prereg_ua_to_hpa() 423 pr_debug("%s: tce %llx at #%lx was not cached, ret=%d\n", in tce_iommu_unuse_page_v2() 484 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) in tce_iommu_use_page() argument 487 enum dma_data_direction direction = iommu_tce_direction(tce); in tce_iommu_use_page() 489 if (pin_user_pages_fast(tce & PAGE_MASK, 1, in tce_iommu_use_page() 501 unsigned long entry, unsigned long tce, unsigned long pages, in tce_iommu_build() 509 unsigned long offset = tce in tce_iommu_build() 389 tce_iommu_prereg_ua_to_hpa(struct tce_container *container, unsigned long tce, unsigned long shift, unsigned long *phpa, struct mm_iommu_table_group_mem_t **pmem) tce_iommu_prereg_ua_to_hpa() argument 499 tce_iommu_build(struct tce_container *container, struct iommu_table *tbl, unsigned long entry, unsigned long tce, unsigned long pages, enum dma_data_direction direction) tce_iommu_build() argument 547 tce_iommu_build_v2(struct tce_container *container, struct iommu_table *tbl, unsigned long entry, unsigned long tce, unsigned long pages, enum dma_data_direction direction) tce_iommu_build_v2() argument [all...] |
/kernel/linux/linux-6.6/drivers/vfio/ |
H A D | vfio_iommu_spapr_tce.c | 27 #include <asm/tce.h> 391 unsigned long tce, unsigned long shift, in tce_iommu_prereg_ua_to_hpa() 397 mem = mm_iommu_lookup(container->mm, tce, 1ULL << shift); in tce_iommu_prereg_ua_to_hpa() 401 ret = mm_iommu_ua_to_hpa(mem, tce, shift, phpa); in tce_iommu_prereg_ua_to_hpa() 424 pr_debug("%s: tce %llx at #%lx was not cached, ret=%d\n", in tce_iommu_unuse_page_v2() 485 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) in tce_iommu_use_page() argument 488 enum dma_data_direction direction = iommu_tce_direction(tce); in tce_iommu_use_page() 490 if (pin_user_pages_fast(tce & PAGE_MASK, 1, in tce_iommu_use_page() 502 unsigned long entry, unsigned long tce, unsigned long pages, in tce_iommu_build() 510 unsigned long offset = tce in tce_iommu_build() 390 tce_iommu_prereg_ua_to_hpa(struct tce_container *container, unsigned long tce, unsigned long shift, unsigned long *phpa, struct mm_iommu_table_group_mem_t **pmem) tce_iommu_prereg_ua_to_hpa() argument 500 tce_iommu_build(struct tce_container *container, struct iommu_table *tbl, unsigned long entry, unsigned long tce, unsigned long pages, enum dma_data_direction direction) tce_iommu_build() argument 548 tce_iommu_build_v2(struct tce_container *container, struct iommu_table *tbl, unsigned long entry, unsigned long tce, unsigned long pages, enum dma_data_direction direction) tce_iommu_build_v2() argument [all...] |
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
H A D | pci-ioda-tce.c | 17 #include <asm/tce.h> 28 count = of_property_count_u32_elems(dn, "ibm,supported-tce-sizes"); in pnv_ioda_parse_tce_sizes() 39 rc = of_property_read_u32_index(dn, "ibm,supported-tce-sizes", in pnv_ioda_parse_tce_sizes() 92 unsigned long oldtce, tce = be64_to_cpu(READ_ONCE(tmp[n])); in pnv_tce() local 94 if (!tce) { in pnv_tce() 105 tce = __pa(tmp2) | TCE_PCI_READ | TCE_PCI_WRITE; in pnv_tce() 107 cpu_to_be64(tce))); in pnv_tce() 111 tce = oldtce; in pnv_tce() 115 tmp = __va(tce & ~(TCE_PCI_READ | TCE_PCI_WRITE)); in pnv_tce()
|
H A D | pci.c | 29 #include <asm/tce.h>
|
H A D | pci-ioda.c | 33 #include <asm/tce.h>
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/powernv/ |
H A D | pci-ioda-tce.c | 17 #include <asm/tce.h> 28 count = of_property_count_u32_elems(dn, "ibm,supported-tce-sizes"); in pnv_ioda_parse_tce_sizes() 39 rc = of_property_read_u32_index(dn, "ibm,supported-tce-sizes", in pnv_ioda_parse_tce_sizes() 92 unsigned long oldtce, tce = be64_to_cpu(READ_ONCE(tmp[n])); in pnv_tce() local 94 if (!tce) { in pnv_tce() 105 tce = __pa(tmp2) | TCE_PCI_READ | TCE_PCI_WRITE; in pnv_tce() 107 cpu_to_be64(tce))); in pnv_tce() 111 tce = oldtce; in pnv_tce() 115 tmp = __va(tce & ~(TCE_PCI_READ | TCE_PCI_WRITE)); in pnv_tce()
|
H A D | Makefile | 7 KASAN_SANITIZE_pci-ioda-tce.o := n 22 obj-$(CONFIG_PCI) += pci.o pci-ioda.o pci-ioda-tce.o
|
H A D | pci.c | 28 #include <asm/tce.h>
|
/kernel/linux/linux-5.10/arch/powerpc/kernel/ |
H A D | iommu.c | 36 #include <asm/tce.h> 684 * is used to manage allocation of the tce space. 872 * the tce tables. in iommu_alloc_coherent() 965 enum dma_data_direction iommu_tce_direction(unsigned long tce) in iommu_tce_direction() argument 967 if ((tce & TCE_PCI_READ) && (tce & TCE_PCI_WRITE)) in iommu_tce_direction() 969 else if (tce & TCE_PCI_READ) in iommu_tce_direction() 971 else if (tce & TCE_PCI_WRITE) in iommu_tce_direction()
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/pseries/ |
H A D | iommu.c | 34 #include <asm/tce.h> 158 u64 proto_tce, tce; in tce_build_pSeriesLP() local 169 tce = proto_tce | (rpn & TCE_RPN_MASK) << tceshift; in tce_build_pSeriesLP() 170 rc = plpar_tce_put((u64)liobn, (u64)tcenum << tceshift, tce); in tce_build_pSeriesLP() 183 printk("\ttce val = 0x%llx\n", tce ); in tce_build_pSeriesLP() 336 __be32 liobn; /* tce table number */ 383 /* round back to the beginning of the tce page size */ in tce_clearrange_multi_pSeriesLP() 452 /* round back to the beginning of the tce page size */ in tce_setrange_multi_pSeriesLP() 504 basep = of_get_property(node, "linux,tce-base", NULL); in iommu_table_setparms() 505 sizep = of_get_property(node, "linux,tce in iommu_table_setparms() 652 tce_exchange_pseries(struct iommu_table *tbl, long index, unsigned long *tce, enum dma_data_direction *direction, bool realmode) tce_exchange_pseries() argument [all...] |
H A D | vio.c | 31 #include <asm/tce.h> 1187 /* TCE table size - measured in tce entries */ in vio_build_iommu_table()
|
/kernel/linux/linux-6.6/arch/powerpc/kernel/ |
H A D | iommu.c | 36 #include <asm/tce.h> 722 * is used to manage allocation of the tce space. 927 * the tce tables. in iommu_alloc_coherent() 1022 enum dma_data_direction iommu_tce_direction(unsigned long tce) in iommu_tce_direction() argument 1024 if ((tce & TCE_PCI_READ) && (tce & TCE_PCI_WRITE)) in iommu_tce_direction() 1026 else if (tce & TCE_PCI_READ) in iommu_tce_direction() 1028 else if (tce & TCE_PCI_WRITE) in iommu_tce_direction() 1387 .name = "spapr-tce-iommu",
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/pseries/ |
H A D | iommu.c | 35 #include <asm/tce.h> 174 u64 proto_tce, tce; in tce_build_pSeriesLP() local 185 tce = proto_tce | rpn << tceshift; in tce_build_pSeriesLP() 186 rc = plpar_tce_put((u64)liobn, (u64)tcenum << tceshift, tce); in tce_build_pSeriesLP() 199 printk("\ttce val = 0x%llx\n", tce ); in tce_build_pSeriesLP() 366 __be32 liobn; /* tce table number */ 413 /* round back to the beginning of the tce page size */ in tce_clearrange_multi_pSeriesLP() 482 /* round back to the beginning of the tce page size */ in tce_setrange_multi_pSeriesLP() 557 basep = of_get_property(node, "linux,tce-base", NULL); in iommu_table_setparms() 558 sizep = of_get_property(node, "linux,tce in iommu_table_setparms() 664 tce_exchange_pseries(struct iommu_table *tbl, long index, unsigned long *tce, enum dma_data_direction *direction) tce_exchange_pseries() argument [all...] |
H A D | vio.c | 33 #include <asm/tce.h> 1190 /* TCE table size - measured in tce entries */ in vio_build_iommu_table()
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
H A D | iommu.h | 49 * @tce is a physical address. 100 unsigned long it_base; /* mapped address of tce table */ 316 extern enum dma_data_direction iommu_tce_direction(unsigned long tce);
|
H A D | kvm_ppc.h | 186 unsigned long ioba, unsigned long tce); 747 unsigned long ioba, unsigned long tce);
|
/kernel/linux/linux-6.6/arch/powerpc/include/asm/ |
H A D | iommu.h | 52 * @tce is a physical address. 101 unsigned long it_base; /* mapped address of tce table */ 307 extern enum dma_data_direction iommu_tce_direction(unsigned long tce);
|
H A D | kvm_ppc.h | 191 unsigned long ioba, unsigned long tce); 778 unsigned long ioba, unsigned long tce);
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/ |
H A D | cnic_defs.h | 3311 struct ustorm_fcoe_tce tce; member 3602 struct xstorm_fcoe_tce tce; member
|
/kernel/linux/linux-6.6/drivers/net/ethernet/broadcom/ |
H A D | cnic_defs.h | 3311 struct ustorm_fcoe_tce tce; member 3602 struct xstorm_fcoe_tce tce; member
|