/linux-master/tools/testing/selftests/dma/ |
H A D | dma_map_benchmark.c | 32 /* default granule 1 PAGESIZE */ 33 int granule = 1; local 59 granule = atoi(optarg); 96 if (granule < 1 || granule > 1024) { 97 fprintf(stderr, "invalid granule size\n"); 114 map.granule = granule; 121 printf("dma mapping benchmark: threads:%d seconds:%d node:%d dir:%s granule: %d\n", 122 threads, seconds, node, dir[directions], granule); [all...] |
/linux-master/include/linux/ |
H A D | iova.h | 33 unsigned long granule; /* pfn granularity for this domain */ member in struct:iova_domain 50 return __ffs(iovad->granule); 55 return iovad->granule - 1; 65 return ALIGN(size, iovad->granule); 95 void init_iova_domain(struct iova_domain *iovad, unsigned long granule, 148 unsigned long granule, 147 init_iova_domain(struct iova_domain *iovad, unsigned long granule, unsigned long start_pfn) argument
|
H A D | map_benchmark.h | 29 __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */ member in struct:map_benchmark
|
H A D | io-pgtable.h | 43 void (*tlb_flush_walk)(unsigned long iova, size_t size, size_t granule, 46 unsigned long iova, size_t granule, void *cookie); 253 size_t size, size_t granule) 256 iop->cfg.tlb->tlb_flush_walk(iova, size, granule, iop->cookie); 262 size_t granule) 265 iop->cfg.tlb->tlb_add_page(gather, iova, granule, iop->cookie); 252 io_pgtable_tlb_flush_walk(struct io_pgtable *iop, unsigned long iova, size_t size, size_t granule) argument 260 io_pgtable_tlb_add_page(struct io_pgtable *iop, struct iommu_iotlb_gather * gather, unsigned long iova, size_t granule) argument
|
/linux-master/kernel/dma/ |
H A D | map_benchmark.c | 39 int npages = map->bparam.granule; 216 if (map->bparam.granule < 1 || map->bparam.granule > 1024) { 217 pr_err("invalid granule size\n");
|
/linux-master/drivers/iommu/arm/arm-smmu/ |
H A D | qcom_iommu.c | 148 size_t granule, bool leaf, void *cookie) 164 iova += granule; 165 } while (s -= granule); 170 size_t granule, void *cookie) 172 qcom_iommu_tlb_inv_range_nosync(iova, size, granule, false, cookie); 177 unsigned long iova, size_t granule, 180 qcom_iommu_tlb_inv_range_nosync(iova, granule, granule, true, cookie); 147 qcom_iommu_tlb_inv_range_nosync(unsigned long iova, size_t size, size_t granule, bool leaf, void *cookie) argument 169 qcom_iommu_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument 176 qcom_iommu_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
H A D | arm-smmu.c | 279 size_t granule, void *cookie, int reg) 294 iova += granule; 295 } while (size -= granule); 301 iova += granule >> 12; 302 } while (size -= granule); 307 size_t granule, void *cookie, int reg) 322 iova += granule >> 12; 323 } while (size -= granule); 327 size_t granule, void *cookie) 335 arm_smmu_tlb_inv_range_s1(iova, size, granule, cooki 278 arm_smmu_tlb_inv_range_s1(unsigned long iova, size_t size, size_t granule, void *cookie, int reg) argument 306 arm_smmu_tlb_inv_range_s2(unsigned long iova, size_t size, size_t granule, void *cookie, int reg) argument 326 arm_smmu_tlb_inv_walk_s1(unsigned long iova, size_t size, size_t granule, void *cookie) argument 341 arm_smmu_tlb_add_page_s1(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument 349 arm_smmu_tlb_inv_walk_s2(unsigned long iova, size_t size, size_t granule, void *cookie) argument 357 arm_smmu_tlb_add_page_s2(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument 365 arm_smmu_tlb_inv_walk_s2_v1(unsigned long iova, size_t size, size_t granule, void *cookie) argument 377 arm_smmu_tlb_add_page_s2_v1(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument [all...] |
/linux-master/drivers/iommu/ |
H A D | msm_iommu.c | 139 size_t granule, bool leaf, void *cookie) 159 iova += granule; 160 } while (temp_size -= granule); 171 size_t granule, void *cookie) 173 __flush_iotlb_range(iova, size, granule, false, cookie); 177 unsigned long iova, size_t granule, void *cookie) 179 __flush_iotlb_range(iova, granule, granule, true, cookie); 138 __flush_iotlb_range(unsigned long iova, size_t size, size_t granule, bool leaf, void *cookie) argument 170 __flush_iotlb_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument 176 __flush_iotlb_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
H A D | io-pgtable-arm.c | 734 unsigned long granule, page_sizes; local 739 * translation regime for a particular granule. Aim to match 742 * chosen granule. 745 granule = PAGE_SIZE; 747 granule = 1UL << __fls(cfg->pgsize_bitmap & ~PAGE_MASK); 749 granule = 1UL << __ffs(cfg->pgsize_bitmap & PAGE_MASK); 751 granule = 0; 753 switch (granule) { 964 sl++; /* SL0 format is different for 4K granule size */ 1140 size_t granule, voi 1139 dummy_tlb_flush(unsigned long iova, size_t size, size_t granule, void *cookie) argument 1146 dummy_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument [all...] |
H A D | virtio-iommu.c | 389 unsigned long granule = 1UL << __ffs(vdomain->domain.pgsize_bitmap); local 391 iova = ALIGN(iova, granule); 392 limit = ALIGN_DOWN(limit + 1, granule) - 1; 395 u64 resv_start = ALIGN_DOWN(resv->start, granule); 396 u64 resv_end = ALIGN(resv->start + resv->length, granule) - 1; 671 "granule 0x%lx larger than system page size 0x%lx\n",
|
H A D | iova.c | 37 init_iova_domain(struct iova_domain *iovad, unsigned long granule, argument 45 BUG_ON((granule > PAGE_SIZE) || !is_power_of_2(granule)); 51 iovad->granule = granule;
|
H A D | io-pgtable-arm-v7s.c | 904 size_t granule, void *cookie) 911 unsigned long iova, size_t granule, 914 dummy_tlb_flush(iova, granule, granule, cookie); 968 * Distinct mappings of different granule sizes. 903 dummy_tlb_flush(unsigned long iova, size_t size, size_t granule, void *cookie) argument 910 dummy_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
H A D | dma-iommu.c | 369 return cookie->iovad.granule; 447 if (cookie->type == IOMMU_DMA_IOVA_COOKIE && cookie->iovad.granule) { 500 start += iovad->granule; 704 if (1UL << order != iovad->granule ||
|
H A D | ipmmu-vmsa.c | 317 size_t granule, void *cookie) 316 ipmmu_tlb_flush(unsigned long iova, size_t size, size_t granule, void *cookie) argument
|
/linux-master/arch/arm64/kvm/hyp/ |
H A D | pgtable.c | 90 u64 granule = kvm_granule_size(ctx->level); local 95 if (granule > (ctx->end - ctx->addr)) 98 if (kvm_phys_is_valid(phys) && !IS_ALIGNED(phys, granule)) 101 return IS_ALIGNED(ctx->addr, granule); 516 u64 granule = kvm_granule_size(ctx->level); local 533 if (ctx->end - ctx->addr < granule) 539 *unmapped += granule; 961 u64 granule = kvm_granule_size(ctx->level); local 989 granule); 993 mm_ops->icache_inval_pou(kvm_pte_follow(new, mm_ops), granule); local [all...] |
/linux-master/drivers/gpu/drm/msm/ |
H A D | msm_iommu.c | 220 size_t granule, void *cookie) 230 pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie); 236 unsigned long iova, size_t granule, void *cookie) 219 msm_iommu_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument 235 msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
/linux-master/drivers/iommu/amd/ |
H A D | io_pgtable_v2.c | 335 size_t granule, void *cookie) 340 unsigned long iova, size_t granule, 334 v2_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument 339 v2_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
H A D | io_pgtable.c | 31 size_t granule, void *cookie) 36 unsigned long iova, size_t granule, 30 v1_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument 35 v1_tlb_add_page(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument
|
/linux-master/arch/arm64/kvm/hyp/nvhe/ |
H A D | mem_protect.c | 461 u64 granule = kvm_granule_size(level); local 462 cur.start = ALIGN_DOWN(addr, granule); 463 cur.end = cur.start + granule;
|
/linux-master/drivers/iommu/arm/arm-smmu-v3/ |
H A D | arm-smmu-v3.c | 2020 size_t granule, 2025 size_t inv_range = granule; 2041 * Determine what level the granule is at. For non-leaf, both 2042 * io-pgtable and SVA pass a nominal last-level granule because 2049 cmd->tlbi.ttl = 4 - ((ilog2(granule) - 3) / (tg - 3)); 2090 size_t granule, bool leaf, 2107 __arm_smmu_tlb_inv_range(&cmd, iova, size, granule, smmu_domain); 2117 size_t granule, bool leaf, 2129 __arm_smmu_tlb_inv_range(&cmd, iova, size, granule, smmu_domain); 2133 unsigned long iova, size_t granule, 2018 __arm_smmu_tlb_inv_range(struct arm_smmu_cmdq_ent *cmd, unsigned long iova, size_t size, size_t granule, struct arm_smmu_domain *smmu_domain) argument 2089 arm_smmu_tlb_inv_range_domain(unsigned long iova, size_t size, size_t granule, bool leaf, struct arm_smmu_domain *smmu_domain) argument 2116 arm_smmu_tlb_inv_range_asid(unsigned long iova, size_t size, int asid, size_t granule, bool leaf, struct arm_smmu_domain *smmu_domain) argument 2132 arm_smmu_tlb_inv_page_nosync(struct iommu_iotlb_gather *gather, unsigned long iova, size_t granule, void *cookie) argument 2142 arm_smmu_tlb_inv_walk(unsigned long iova, size_t size, size_t granule, void *cookie) argument [all...] |
H A D | arm-smmu-v3.h | 753 size_t granule, bool leaf,
|
/linux-master/drivers/gpu/drm/panfrost/ |
H A D | panfrost_mmu.c | 393 static void mmu_tlb_flush_walk(unsigned long iova, size_t size, size_t granule, argument
|