Home
last modified time | relevance | path

Searched refs:page_shift (Results 1 – 25 of 133) sorted by relevance

123456

/linux-6.3-rc2/drivers/infiniband/hw/hns/
A Dhns_roce_alloc.c67 u32 page_shift, u32 flags) in hns_roce_buf_alloc() argument
76 if (WARN_ON(page_shift < HNS_HW_PAGE_SHIFT)) in hns_roce_buf_alloc()
84 buf->page_shift = page_shift; in hns_roce_buf_alloc()
85 page_size = 1 << buf->page_shift; in hns_roce_buf_alloc()
134 unsigned int page_shift) in hns_roce_get_kmem_bufs() argument
140 if (page_shift > buf->trunk_shift) { in hns_roce_get_kmem_bufs()
142 page_shift, buf->trunk_shift); in hns_roce_get_kmem_bufs()
150 offset += (1 << page_shift); in hns_roce_get_kmem_bufs()
158 unsigned int page_shift) in hns_roce_get_umem_bufs() argument
164 rdma_umem_for_each_dma_block(umem, &biter, 1 << page_shift) { in hns_roce_get_umem_bufs()
A Dhns_roce_mr.c636 unsigned int page_shift) in mtr_check_direct_pages() argument
638 size_t page_size = 1 << page_shift; in mtr_check_direct_pages()
684 buf_attr->page_shift, in mtr_alloc_bufs()
712 mtr->umem, page_shift); in mtr_map_bufs()
715 mtr->kmem, page_shift); in mtr_map_bufs()
862 unsigned int page_shift; in mtr_init_buf_cfg() local
875 page_shift = HNS_HW_PAGE_SHIFT; in mtr_init_buf_cfg()
883 page_shift = attr->page_shift; in mtr_init_buf_cfg()
885 1 << page_shift); in mtr_init_buf_cfg()
886 cfg->buf_pg_shift = page_shift; in mtr_init_buf_cfg()
[all …]
/linux-6.3-rc2/drivers/infiniband/core/
A Dumem_odp.c59 size_t page_size = 1UL << umem_odp->page_shift; in ib_init_umem_odp()
73 ndmas = (end - start) >> umem_odp->page_shift; in ib_init_umem_odp()
134 umem_odp->page_shift = PAGE_SHIFT; in ib_umem_odp_alloc_implicit()
182 odp_data->page_shift = PAGE_SHIFT; in ib_umem_odp_alloc_child()
244 umem_odp->page_shift = PAGE_SHIFT; in ib_umem_odp_get()
247 umem_odp->page_shift = HPAGE_SHIFT; in ib_umem_odp_get()
353 unsigned int page_shift, hmm_order, pfn_start_idx; in ib_umem_odp_map_dma_and_lock() local
365 page_shift = umem_odp->page_shift; in ib_umem_odp_map_dma_and_lock()
439 if (hmm_order + PAGE_SHIFT < page_shift) { in ib_umem_odp_map_dma_and_lock()
443 __func__, hmm_order, page_shift); in ib_umem_odp_map_dma_and_lock()
[all …]
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/en/
A Dparams.c42 u8 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk); in mlx5e_mpwrq_umr_mode() local
47 oversized = xsk->chunk_size < (1 << page_shift); in mlx5e_mpwrq_umr_mode()
48 WARN_ON_ONCE(xsk->chunk_size > (1 << page_shift)); in mlx5e_mpwrq_umr_mode()
124 pages_per_wqe = log_wqe_sz > page_shift ? (1 << (log_wqe_sz - page_shift)) : 1; in mlx5e_mpwrq_pages_per_wqe()
275 u8 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk); in mlx5e_mpwqe_log_pkts_per_wqe() local
303 u8 page_shift, in mlx5e_verify_rx_mpwqe_strides() argument
345 log_num_strides, page_shift, in mlx5e_rx_mpwqe_is_linear_skb()
354 u8 log_pkts_per_wqe, page_shift, max_log_rq_size; in mlx5e_mpwqe_get_log_rq_size() local
357 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk); in mlx5e_mpwqe_get_log_rq_size()
590 page_shift, umr_mode); in mlx5e_mpwrq_validate_xsk()
[all …]
A Dparams.h62 u8 mlx5e_mpwrq_log_wqe_sz(struct mlx5_core_dev *mdev, u8 page_shift,
64 u8 mlx5e_mpwrq_pages_per_wqe(struct mlx5_core_dev *mdev, u8 page_shift,
66 u16 mlx5e_mpwrq_umr_wqe_sz(struct mlx5_core_dev *mdev, u8 page_shift,
68 u8 mlx5e_mpwrq_umr_wqebbs(struct mlx5_core_dev *mdev, u8 page_shift,
70 u8 mlx5e_mpwrq_mtts_per_wqe(struct mlx5_core_dev *mdev, u8 page_shift,
74 u8 mlx5e_mpwrq_max_log_rq_pkts(struct mlx5_core_dev *mdev, u8 page_shift,
/linux-6.3-rc2/drivers/pci/endpoint/
A Dpci-epc-mem.c26 unsigned int page_shift = ilog2(mem->window.page_size); in pci_epc_mem_get_order() local
29 size >>= page_shift; in pci_epc_mem_get_order()
53 unsigned int page_shift; in pci_epc_multi_mem_init() local
73 page_shift = ilog2(page_size); in pci_epc_multi_mem_init()
74 pages = windows[i].size >> page_shift; in pci_epc_multi_mem_init()
173 unsigned int page_shift; in pci_epc_mem_alloc_addr() local
188 page_shift = ilog2(mem->window.page_size); in pci_epc_mem_alloc_addr()
190 ((phys_addr_t)pageno << page_shift); in pci_epc_mem_alloc_addr()
238 unsigned int page_shift; in pci_epc_mem_free_addr() local
250 page_shift = ilog2(page_size); in pci_epc_mem_free_addr()
[all …]
/linux-6.3-rc2/tools/testing/selftests/powerpc/mm/
A Dbad_accesses.c69 unsigned long i, j, addr, region_shift, page_shift, page_size; in test() local
84 page_shift = 16; in test()
86 page_shift = 12; in test()
103 (1 << page_shift) >> 10, in test()
121 for (j = page_shift - 1; j < 60; j++) { in test()
130 addr = (base | delta) & ~((1 << page_shift) - 1); in test()
/linux-6.3-rc2/arch/powerpc/include/asm/
A Dultravisor.h50 u64 page_shift) in uv_page_in() argument
53 page_shift); in uv_page_in()
57 u64 page_shift) in uv_page_out() argument
60 page_shift); in uv_page_out()
75 static inline int uv_page_inval(u64 lpid, u64 gpa, u64 page_shift) in uv_page_inval() argument
77 return ucall_norets(UV_PAGE_INVAL, lpid, gpa, page_shift); in uv_page_inval()
A Dkvm_book3s_uvmem.h15 unsigned long page_shift);
19 unsigned long page_shift);
54 unsigned long flags, unsigned long page_shift) in kvmppc_h_svm_page_in() argument
61 unsigned long flags, unsigned long page_shift) in kvmppc_h_svm_page_out() argument
A Diommu.h163 __u32 page_shift,
168 __u32 page_shift,
289 extern int iommu_tce_check_ioba(unsigned long page_shift,
292 extern int iommu_tce_check_gpa(unsigned long page_shift,
/linux-6.3-rc2/tools/testing/selftests/kvm/lib/aarch64/
A Dprocessor.c27 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index()
35 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index()
36 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pud_index()
46 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index()
47 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pmd_index()
57 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pte_index()
58 return (gva >> vm->page_shift) & mask; in pte_index()
63 uint64_t mask = ((1UL << (vm->va_bits - vm->page_shift)) - 1) << vm->page_shift; in pte_addr()
69 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in ptrs_per_pgd()
75 return 1 << (vm->page_shift - 3); in ptrs_per_pte()
[all …]
/linux-6.3-rc2/arch/powerpc/kvm/
A Dbook3s_64_vio.c147 if ((tbltmp->it_page_shift <= stt->page_shift) && in kvm_spapr_tce_attach_iommu_group()
149 stt->offset << stt->page_shift) && in kvm_spapr_tce_attach_iommu_group()
151 stt->size << stt->page_shift)) { in kvm_spapr_tce_attach_iommu_group()
300 if (!args->size || args->page_shift < 12 || args->page_shift > 34 || in kvm_vm_ioctl_create_spapr_tce()
315 stt->page_shift = args->page_shift; in kvm_vm_ioctl_create_spapr_tce()
382 if (iommu_tce_check_gpa(stt->page_shift, gpa)) in kvmppc_tce_validate()
605 entry = ioba >> stt->page_shift; in kvmppc_h_put_tce()
646 entry = ioba >> stt->page_shift; in kvmppc_h_put_tce_indirect()
745 unsigned long entry = ioba >> stt->page_shift; in kvmppc_h_stuff_tce()
763 kvmppc_tce_put(stt, ioba >> stt->page_shift, tce_value); in kvmppc_h_stuff_tce()
[all …]
A Dbook3s_hv_uvmem.c568 gpa, 0, page_shift); in __kvmppc_svm_page_out()
587 unsigned long page_shift, in kvmppc_svm_page_out() argument
742 unsigned long page_shift, in kvmppc_svm_page_in() argument
780 gpa, 0, page_shift); in kvmppc_svm_page_in()
877 unsigned long page_shift) in kvmppc_share_page() argument
918 page_shift)) { in kvmppc_share_page()
937 unsigned long page_shift) in kvmppc_h_svm_page_in() argument
948 if (page_shift != PAGE_SHIFT) in kvmppc_h_svm_page_in()
970 end = start + (1UL << page_shift); in kvmppc_h_svm_page_in()
1057 if (page_shift != PAGE_SHIFT) in kvmppc_h_svm_page_out()
[all …]
/linux-6.3-rc2/tools/testing/selftests/mm/
A Dhmm-tests.c67 unsigned int page_shift; in FIXTURE() local
90 unsigned int page_shift; in FIXTURE() local
299 size = npages << self->page_shift; in TEST_F()
362 size = npages << self->page_shift; in TEST_F()
421 size = npages << self->page_shift; in TEST_F()
469 size = npages << self->page_shift; in TEST_F()
537 size = npages << self->page_shift; in TEST_F()
615 size = npages << self->page_shift; in TEST_F()
707 npages = size >> self->page_shift; in TEST_F()
799 npages = size >> self->page_shift; in TEST_F()
[all …]
A Dutil.h22 static inline unsigned int page_shift(void) in page_shift() function
29 #define PAGE_SHIFT (page_shift())
/linux-6.3-rc2/tools/testing/selftests/kvm/lib/
A Dkvm_util.c204 (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_vaddr_populate_bitmap()
225 vm->page_shift = vm_guest_mode_params[mode].page_shift; in ____vm_create()
775 if ((ptr1 >> vm->page_shift) != ((ptr1 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
777 if ((ptr2 >> vm->page_shift) != ((ptr2 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
780 assert((ptr1 >> vm->page_shift) == ((ptr1 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
781 assert((ptr2 >> vm->page_shift) == ((ptr2 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
1014 guest_paddr >> vm->page_shift, npages); in vm_userspace_mem_region_add()
1913 base = pg = paddr_min >> vm->page_shift; in vm_phy_pages_alloc()
1974 unsigned int page_shift, in vm_calc_num_pages() argument
1980 if (page_shift >= new_page_shift) in vm_calc_num_pages()
[all …]
/linux-6.3-rc2/include/linux/
A Dkmsan.h141 unsigned int page_shift);
166 unsigned int page_shift);
288 unsigned int page_shift) in kmsan_vmap_pages_range_noflush() argument
301 unsigned int page_shift) in kmsan_ioremap_page_range() argument
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx4/
A Dmr.c201 mtt->page_shift = MLX4_ICM_PAGE_SHIFT; in mlx4_mtt_init()
204 mtt->page_shift = page_shift; in mlx4_mtt_init()
419 int page_shift, struct mlx4_mr *mr) in mlx4_mr_alloc_reserved() argument
528 int npages, int page_shift, struct mlx4_mr *mr) in mlx4_mr_alloc() argument
538 access, npages, page_shift, mr); in mlx4_mr_alloc()
591 int page_shift, struct mlx4_mpt_entry *mpt_entry) in mlx4_mr_rereg_mem_write() argument
595 err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); in mlx4_mr_rereg_mem_write()
601 mpt_entry->entity_size = cpu_to_be32(page_shift); in mlx4_mr_rereg_mem_write()
610 if (mr->mtt.page_shift == 0) in mlx4_mr_rereg_mem_write()
613 if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { in mlx4_mr_rereg_mem_write()
[all …]
/linux-6.3-rc2/tools/testing/selftests/kvm/lib/x86_64/
A Dvmx.c380 pte->address = paddr >> vm->page_shift; in nested_create_pte()
382 pte->address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_create_pte()
416 TEST_ASSERT((nested_paddr >> vm->page_shift) <= vm->max_gfn, in __nested_pg_map()
424 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in __nested_pg_map()
506 i = (region->region.guest_phys_addr >> vm->page_shift) - 1; in nested_map_memslot()
507 last = i + (region->region.memory_size >> vm->page_shift); in nested_map_memslot()
514 (uint64_t)i << vm->page_shift, in nested_map_memslot()
515 (uint64_t)i << vm->page_shift, in nested_map_memslot()
516 1 << vm->page_shift); in nested_map_memslot()
/linux-6.3-rc2/arch/powerpc/platforms/pseries/
A Diommu.c512 tbl->it_offset = win_addr >> page_shift; in iommu_table_setparms_common()
513 tbl->it_size = window_size >> page_shift; in iommu_table_setparms_common()
514 tbl->it_page_shift = page_shift; in iommu_table_setparms_common()
1093 BUID_LO(buid), page_shift, window_shift); in create_ddw()
1200 u32 page_shift, u32 window_shift) in ddw_property_create() argument
1222 ddwprop->tce_shift = cpu_to_be32(page_shift); in ddw_property_create()
1245 int page_shift; in enable_ddw() local
1344 page_shift = iommu_get_page_shift(query.page_size); in enable_ddw()
1345 if (!page_shift) { in enable_ddw()
1361 (1ULL << (MAX_PHYSMEM_BITS - page_shift))) in enable_ddw()
[all …]
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/
A Dbpf_iter_vma_offset.c13 __u32 page_shift = 0; variable
33 offset = address - vma->vm_start + (vma->vm_pgoff << page_shift); in get_vma_offset()
/linux-6.3-rc2/arch/powerpc/platforms/powernv/
A Dpci-ioda-tce.c50 u64 dma_offset, unsigned int page_shift) in pnv_pci_setup_iommu_table() argument
54 tbl->it_page_shift = page_shift; in pnv_pci_setup_iommu_table()
291 __u32 page_shift, __u64 window_size, __u32 levels, in pnv_pci_ioda2_table_alloc_pages() argument
298 unsigned int entries_shift = window_shift - page_shift; in pnv_pci_ioda2_table_alloc_pages()
314 if ((level_shift - 3) * levels + page_shift >= 55) in pnv_pci_ioda2_table_alloc_pages()
348 page_shift); in pnv_pci_ioda2_table_alloc_pages()
/linux-6.3-rc2/drivers/mtd/nand/raw/
A Dnand_bbt.c180 from = ((loff_t)page) << this->page_shift; in read_bbt()
561 int blocktopage = this->bbt_erase_shift - this->page_shift; in search_bbt()
667 (this->bbt_erase_shift - this->page_shift); in get_bbt_block()
695 page = block << (this->bbt_erase_shift - this->page_shift); in get_bbt_block()
819 to = ((loff_t)page) << this->page_shift; in write_bbt()
835 ops.ooblen = (len >> this->page_shift) * mtd->oobsize; in write_bbt()
842 pageoffs = page - (int)(to >> this->page_shift); in write_bbt()
843 offs = pageoffs << this->page_shift; in write_bbt()
870 (len >> this->page_shift)* mtd->oobsize); in write_bbt()
1088 len += (len >> this->page_shift) * mtd->oobsize; in nand_update_bbt()
[all …]
/linux-6.3-rc2/drivers/infiniband/sw/rdmavt/
A Dmr.c368 mr->mr.page_shift = PAGE_SHIFT; in rvt_reg_user_mr()
560 u32 ps = 1 << mr->mr.page_shift; in rvt_set_page()
561 u32 mapped_segs = mr->mr.length >> mr->mr.page_shift; in rvt_set_page()
595 mr->mr.page_shift = PAGE_SHIFT; in rvt_map_mr_sg()
772 if (mr->page_shift) { in rvt_lkey_ok()
780 entries_spanned_by_off = off >> mr->page_shift; in rvt_lkey_ok()
781 off -= (entries_spanned_by_off << mr->page_shift); in rvt_lkey_ok()
879 if (mr->page_shift) { in rvt_rkey_ok()
887 entries_spanned_by_off = off >> mr->page_shift; in rvt_rkey_ok()
888 off -= (entries_spanned_by_off << mr->page_shift); in rvt_rkey_ok()
/linux-6.3-rc2/include/rdma/
A Dib_umem_odp.h44 unsigned int page_shift; member
67 umem_odp->page_shift; in ib_umem_odp_num_pages()

Completed in 67 milliseconds

123456