Home
last modified time | relevance | path

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

1234567

/openbmc/linux/drivers/infiniband/hw/hns/
H 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()
H A Dhns_roce_mr.c641 unsigned int page_shift) in mtr_check_direct_pages() argument
643 size_t page_size = 1 << page_shift; in mtr_check_direct_pages()
689 buf_attr->page_shift, in mtr_alloc_bufs()
717 mtr->umem, page_shift); in mtr_map_bufs()
720 mtr->kmem, page_shift); in mtr_map_bufs()
867 unsigned int page_shift; in mtr_init_buf_cfg() local
880 page_shift = HNS_HW_PAGE_SHIFT; in mtr_init_buf_cfg()
888 page_shift = attr->page_shift; in mtr_init_buf_cfg()
890 1 << page_shift); in mtr_init_buf_cfg()
891 cfg->buf_pg_shift = page_shift; in mtr_init_buf_cfg()
[all …]
/openbmc/linux/drivers/infiniband/core/
H 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 …]
/openbmc/qemu/hw/ppc/
H A Dspapr_iommu.c128 if ((addr >> tcet->page_shift) < tcet->nb_table) { in spapr_tce_translate_iommu()
132 tce = tcet->table[addr >> tcet->page_shift]; in spapr_tce_translate_iommu()
191 return 1ULL << tcet->page_shift; in spapr_tce_get_min_page_size()
232 uint32_t old_page_shift = tcet->page_shift; in spapr_tce_table_post_load()
275 VMSTATE_UINT32(page_shift, SpaprTceTable),
392 tcet->page_shift = page_shift; in spapr_tce_table_enable()
420 tcet->page_shift = 0; in spapr_tce_table_disable()
499 page_mask = IOMMU_PAGE_MASK(tcet->page_shift); in h_put_tce_indirect()
500 page_size = IOMMU_PAGE_SIZE(tcet->page_shift); in h_put_tce_indirect()
542 page_mask = IOMMU_PAGE_MASK(tcet->page_shift); in h_stuff_tce()
[all …]
H A Dfdt.c27 if (!sps->page_shift) { in ppc_create_page_sizes_prop()
31 if (sps->enc[count].page_shift == 0) { in ppc_create_page_sizes_prop()
38 *(p++) = cpu_to_be32(sps->page_shift); in ppc_create_page_sizes_prop()
42 *(p++) = cpu_to_be32(sps->enc[j].page_shift); in ppc_create_page_sizes_prop()
H A Dspapr_rtas_ddw.c151 uint32_t addr, page_shift, window_shift, liobn; in rtas_ibm_create_pe_dma_window() local
166 page_shift = rtas_ld(args, 3); in rtas_ibm_create_pe_dma_window()
171 if (!(sphb->page_size_mask & (1ULL << page_shift)) || in rtas_ibm_create_pe_dma_window()
172 (window_shift < page_shift)) { in rtas_ibm_create_pe_dma_window()
195 spapr_tce_table_enable(tcet, page_shift, win_addr, in rtas_ibm_create_pe_dma_window()
196 1ULL << (window_shift - page_shift)); in rtas_ibm_create_pe_dma_window()
202 trace_spapr_iommu_ddw_create(buid, addr, 1ULL << page_shift, in rtas_ibm_create_pe_dma_window()
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dparams.c43 u8 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk); in mlx5e_mpwrq_umr_mode() local
48 oversized = xsk->chunk_size < (1 << page_shift); in mlx5e_mpwrq_umr_mode()
49 WARN_ON_ONCE(xsk->chunk_size > (1 << page_shift)); in mlx5e_mpwrq_umr_mode()
125 pages_per_wqe = log_wqe_sz > page_shift ? (1 << (log_wqe_sz - page_shift)) : 1; in mlx5e_mpwrq_pages_per_wqe()
307 u8 page_shift, in mlx5e_verify_rx_mpwqe_strides() argument
338 page_shift, umr_mode); in mlx5e_verify_params_rx_mpwqe_strides()
363 log_num_strides, page_shift, in mlx5e_rx_mpwqe_is_linear_skb()
372 u8 log_pkts_per_wqe, page_shift, max_log_rq_size; in mlx5e_mpwqe_get_log_rq_size() local
375 page_shift = mlx5e_mpwrq_page_shift(mdev, xsk); in mlx5e_mpwqe_get_log_rq_size()
609 page_shift, umr_mode); in mlx5e_mpwrq_validate_xsk()
[all …]
H A Dparams.h63 u8 mlx5e_mpwrq_log_wqe_sz(struct mlx5_core_dev *mdev, u8 page_shift,
65 u8 mlx5e_mpwrq_pages_per_wqe(struct mlx5_core_dev *mdev, u8 page_shift,
67 u16 mlx5e_mpwrq_umr_wqe_sz(struct mlx5_core_dev *mdev, u8 page_shift,
69 u8 mlx5e_mpwrq_umr_wqebbs(struct mlx5_core_dev *mdev, u8 page_shift,
71 u8 mlx5e_mpwrq_mtts_per_wqe(struct mlx5_core_dev *mdev, u8 page_shift,
75 u8 mlx5e_mpwrq_max_log_rq_pkts(struct mlx5_core_dev *mdev, u8 page_shift,
/openbmc/linux/drivers/pci/endpoint/
H 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()
183 unsigned int page_shift; in pci_epc_mem_alloc_addr() local
198 page_shift = ilog2(mem->window.page_size); in pci_epc_mem_alloc_addr()
200 ((phys_addr_t)pageno << page_shift); in pci_epc_mem_alloc_addr()
248 unsigned int page_shift; in pci_epc_mem_free_addr() local
260 page_shift = ilog2(page_size); in pci_epc_mem_free_addr()
[all …]
/openbmc/linux/tools/testing/selftests/powerpc/mm/
H 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()
/openbmc/linux/arch/powerpc/include/asm/
H 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()
H 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
/openbmc/linux/tools/testing/selftests/kvm/lib/aarch64/
H 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()
46 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index()
58 return (gva >> vm->page_shift) & mask; in pte_index()
65 pte = pa & GENMASK(47, vm->page_shift); in addr_pte()
66 if (vm->page_shift == 16) in addr_pte()
77 pa = pte & GENMASK(47, vm->page_shift); in pte_addr()
78 if (vm->page_shift == 16) in pte_addr()
86 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in ptrs_per_pgd()
92 return 1 << (vm->page_shift - 3); in ptrs_per_pte()
[all …]
/openbmc/qemu/target/ppc/
H A Dmmu-hash64.c264 if (!sps1->page_shift) { in ppc_store_slb()
604 if (sps->page_shift != 12) { in hpte_page_shift()
616 if (!ps->page_shift) { in hpte_page_shift()
620 if (ps->page_shift == 12) { in hpte_page_shift()
628 return ps->page_shift; in hpte_page_shift()
726 assert(sps->page_shift == 12); in ppc_hash64_htab_lookup()
792 if (!sps->page_shift) { in ppc_hash64_hpte_page_shift_noslb()
965 if (!sps->page_shift) { in build_vrma_slbe()
1245 { .page_shift = 12, /* 4K */
1249 { .page_shift = 24, /* 16M */
[all …]
/openbmc/linux/arch/powerpc/kvm/
H A Dbook3s_64_vio.c149 if ((tbltmp->it_page_shift <= stt->page_shift) && in kvm_spapr_tce_attach_iommu_group()
151 stt->offset << stt->page_shift) && in kvm_spapr_tce_attach_iommu_group()
153 stt->size << stt->page_shift)) { in kvm_spapr_tce_attach_iommu_group()
308 if (!args->size || args->page_shift < 12 || args->page_shift > 34 || in kvm_vm_ioctl_create_spapr_tce()
323 stt->page_shift = args->page_shift; in kvm_vm_ioctl_create_spapr_tce()
390 if (iommu_tce_check_gpa(stt->page_shift, gpa)) in kvmppc_tce_validate()
613 entry = ioba >> stt->page_shift; in kvmppc_h_put_tce()
654 entry = ioba >> stt->page_shift; in kvmppc_h_put_tce_indirect()
753 unsigned long entry = ioba >> stt->page_shift; in kvmppc_h_stuff_tce()
771 kvmppc_tce_put(stt, ioba >> stt->page_shift, tce_value); in kvmppc_h_stuff_tce()
[all …]
H A Dbook3s_hv_uvmem.c569 gpa, 0, page_shift); in __kvmppc_svm_page_out()
588 unsigned long page_shift, in kvmppc_svm_page_out() argument
743 unsigned long page_shift, in kvmppc_svm_page_in() argument
781 gpa, 0, page_shift); in kvmppc_svm_page_in()
878 unsigned long page_shift) in kvmppc_share_page() argument
919 page_shift)) { in kvmppc_share_page()
938 unsigned long page_shift) in kvmppc_h_svm_page_in() argument
949 if (page_shift != PAGE_SHIFT) in kvmppc_h_svm_page_in()
971 end = start + (1UL << page_shift); in kvmppc_h_svm_page_in()
1058 if (page_shift != PAGE_SHIFT) in kvmppc_h_svm_page_out()
[all …]
/openbmc/linux/tools/testing/selftests/mm/
H A Dhmm-tests.c72 unsigned int page_shift; in FIXTURE() local
95 unsigned int page_shift; in FIXTURE() local
304 size = npages << self->page_shift; in TEST_F()
367 size = npages << self->page_shift; in TEST_F()
426 size = npages << self->page_shift; in TEST_F()
474 size = npages << self->page_shift; in TEST_F()
542 size = npages << self->page_shift; in TEST_F()
620 size = npages << self->page_shift; in TEST_F()
712 npages = size >> self->page_shift; in TEST_F()
804 npages = size >> self->page_shift; in TEST_F()
[all …]
/openbmc/linux/include/linux/
H A Dkmsan.h145 unsigned int page_shift);
171 unsigned int page_shift);
290 struct page **pages, unsigned int page_shift) in kmsan_vmap_pages_range_noflush() argument
304 unsigned int page_shift) in kmsan_ioremap_page_range() argument
/openbmc/u-boot/drivers/mtd/nand/raw/
H A Dmxs_nand_spl.c120 chip->page_shift = ffs(mtd->writesize) - 1; in mxs_flash_onfi_ident()
123 chip->pagemask = (chip->chipsize >> chip->page_shift) - 1; in mxs_flash_onfi_ident()
127 debug("writesize=%d (>>%d)\n", mtd->writesize, chip->page_shift); in mxs_flash_onfi_ident()
165 unsigned int page = offs >> chip->page_shift; in is_badblock()
218 page = offs >> chip->page_shift; in nand_spl_load_image()
244 if (page >= mtd->size >> chip->page_shift) in nand_spl_load_image()
/openbmc/linux/tools/testing/selftests/kvm/lib/
H A Dkvm_util.c209 (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_vaddr_populate_bitmap()
230 vm->page_shift = vm_guest_mode_params[mode].page_shift; in ____vm_create()
801 if ((ptr1 >> vm->page_shift) != ((ptr1 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
803 if ((ptr2 >> vm->page_shift) != ((ptr2 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
806 assert((ptr1 >> vm->page_shift) == ((ptr1 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
807 assert((ptr2 >> vm->page_shift) == ((ptr2 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
1040 guest_paddr >> vm->page_shift, npages); in vm_userspace_mem_region_add()
1954 base = pg = paddr_min >> vm->page_shift; in vm_phy_pages_alloc()
2015 unsigned int page_shift, in vm_calc_num_pages() argument
2021 if (page_shift >= new_page_shift) in vm_calc_num_pages()
[all …]
/openbmc/qemu/hw/block/
H A Dnand.c68 int page_shift, oob_shift, erase_shift, addr_shift; member
149 int page_shift; member
262 iolen = (1 << s->page_shift); in nand_load_block()
397 s->page_shift = 11; in nand_realize()
400 s->page_shift = nand_flash_ids[s->chip_id].page_shift; in nand_realize()
404 switch (1 << s->page_shift) { in nand_realize()
416 1 << s->page_shift); in nand_realize()
438 pagesize += 1 << s->page_shift; in nand_realize()
527 s->offset = 1 << s->page_shift; in nand_setio()
594 if (s->iolen < (1 << s->page_shift) + (1 << s->oob_shift)) { in nand_setio()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/
H 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 …]
/openbmc/linux/tools/testing/selftests/bpf/progs/
H 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()
/openbmc/linux/tools/testing/selftests/kvm/lib/x86_64/
H 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()
/openbmc/qemu/hw/intc/
H A Dpnv_xive.c98 return page_shift == 12 || page_shift == 16 || in pnv_xive_vst_page_size_allowed()
99 page_shift == 21 || page_shift == 24; in pnv_xive_vst_page_size_allowed()
128 uint32_t page_shift; in pnv_xive_vst_addr_indirect() local
147 page_shift = GETFIELD(VSD_TSIZE, vsd) + 12; in pnv_xive_vst_addr_indirect()
151 page_shift); in pnv_xive_vst_addr_indirect()
609 uint32_t page_shift; in pnv_xive_vst_per_subpage() local
632 page_shift = GETFIELD(VSD_TSIZE, vsd) + 12; in pnv_xive_vst_per_subpage()
636 page_shift); in pnv_xive_vst_per_subpage()
640 return (1ull << page_shift) / info->size; in pnv_xive_vst_per_subpage()
773 uint64_t vst_tsize = 1ull << page_shift; in pnv_xive_vst_set_exclusive()
[all …]

1234567