Home
last modified time | relevance | path

Searched refs:page_size (Results 1 – 25 of 154) sorted by relevance

1234567

/drivers/pci/endpoint/
Dpci-epc-mem.c26 unsigned int page_shift = ilog2(mem->page_size); in pci_epc_mem_get_order()
49 size_t page_size) in __pci_epc_mem_init() argument
58 if (page_size < PAGE_SIZE) in __pci_epc_mem_init()
59 page_size = PAGE_SIZE; in __pci_epc_mem_init()
61 page_shift = ilog2(page_size); in __pci_epc_mem_init()
79 mem->page_size = page_size; in __pci_epc_mem_init()
127 unsigned int page_shift = ilog2(mem->page_size); in pci_epc_mem_alloc_addr()
130 size = ALIGN(size, mem->page_size); in pci_epc_mem_alloc_addr()
160 unsigned int page_shift = ilog2(mem->page_size); in pci_epc_mem_free_addr()
165 size = ALIGN(size, mem->page_size); in pci_epc_mem_free_addr()
/drivers/misc/
Dvmw_balloon.c246 enum vmballoon_page_size_type page_size; member
580 unsigned int vmballoon_page_order(enum vmballoon_page_size_type page_size) in vmballoon_page_order() argument
582 return page_size == VMW_BALLOON_2M_PAGE ? VMW_BALLOON_2M_ORDER : 0; in vmballoon_page_order()
592 vmballoon_page_in_frames(enum vmballoon_page_size_type page_size) in vmballoon_page_in_frames() argument
594 return 1 << vmballoon_page_order(page_size); in vmballoon_page_in_frames()
604 enum vmballoon_page_size_type page_size) in vmballoon_mark_page_offline() argument
608 for (i = 0; i < vmballoon_page_in_frames(page_size); i++) in vmballoon_mark_page_offline()
619 enum vmballoon_page_size_type page_size) in vmballoon_mark_page_online() argument
623 for (i = 0; i < vmballoon_page_in_frames(page_size); i++) in vmballoon_mark_page_online()
683 if (ctl->page_size == VMW_BALLOON_2M_PAGE) in vmballoon_alloc_page_list()
[all …]
/drivers/misc/habanalabs/
Dmemory.c60 u32 num_curr_pgs, page_size, page_shift; in alloc_device_memory() local
65 page_size = hdev->asic_prop.dram_page_size; in alloc_device_memory()
66 page_shift = __ffs(page_size); in alloc_device_memory()
67 num_pgs = (args->alloc.mem_size + (page_size - 1)) >> page_shift; in alloc_device_memory()
91 phys_pg_pack->page_size = page_size; in alloc_device_memory()
104 phys_pg_pack->pages[i] = paddr + i * page_size; in alloc_device_memory()
109 page_size); in alloc_device_memory()
149 page_size); in alloc_device_memory()
284 phys_pg_pack->page_size); in free_phys_pg_pack()
528 u32 page_size; in get_va_block() local
[all …]
Dmmu.c667 int hl_mmu_unmap(struct hl_ctx *ctx, u64 virt_addr, u32 page_size) in hl_mmu_unmap() argument
681 if ((page_size % PAGE_SIZE_2MB) == 0) { in hl_mmu_unmap()
683 } else if ((page_size % PAGE_SIZE_4KB) == 0) { in hl_mmu_unmap()
688 page_size); in hl_mmu_unmap()
693 npages = page_size / real_page_size; in hl_mmu_unmap()
708 u32 page_size) in _hl_mmu_map() argument
729 is_huge = page_size == PAGE_SIZE_2MB; in _hl_mmu_map()
731 is_dram_addr = hl_mem_area_inside_range(virt_addr, page_size, in _hl_mmu_map()
890 int hl_mmu_map(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr, u32 page_size) in hl_mmu_map() argument
904 if ((page_size % PAGE_SIZE_2MB) == 0) { in hl_mmu_map()
[all …]
/drivers/gpu/drm/i915/gem/selftests/
Dhuge_pages.c34 unsigned int page_size = page_sizes[i]; in get_largest_page_size() local
36 if (HAS_PAGE_SIZES(i915, page_size) && rem >= page_size) in get_largest_page_size()
37 return page_size; in get_largest_page_size()
86 unsigned int page_size = BIT(bit); in get_huge_pages() local
87 int order = get_order(page_size); in get_huge_pages()
97 sg_set_page(sg, page, page_size, 0); in get_huge_pages()
98 sg_page_sizes |= page_size; in get_huge_pages()
101 rem -= page_size; in get_huge_pages()
108 } while ((rem - ((page_size-1) & page_mask)) >= page_size); in get_huge_pages()
110 page_mask &= (page_size-1); in get_huge_pages()
[all …]
/drivers/misc/cxl/
Dcxllib.c205 unsigned long *page_size) in get_vma_info() argument
217 *page_size = vma_kernel_pagesize(vma); in get_vma_info()
229 unsigned long page_size; in cxllib_handle_fault() local
240 rc = get_vma_info(mm, addr, &vma_start, &vma_end, &page_size); in cxllib_handle_fault()
244 for (dar = (addr & ~(page_size - 1)); dar < (addr + size); in cxllib_handle_fault()
245 dar += page_size) { in cxllib_handle_fault()
262 &page_size); in cxllib_handle_fault()
/drivers/mtd/devices/
Dmtd_dataflash.c91 unsigned int page_size; /* of bytes per page */ member
154 unsigned blocksize = priv->page_size << 3; in dataflash_erase()
161 div_u64_rem(instr->len, priv->page_size, &rem); in dataflash_erase()
164 div_u64_rem(instr->addr, priv->page_size, &rem); in dataflash_erase()
183 pageaddr = div_u64(instr->addr, priv->page_size); in dataflash_erase()
213 instr->addr += priv->page_size; in dataflash_erase()
214 instr->len -= priv->page_size; in dataflash_erase()
243 addr = (((unsigned)from / priv->page_size) << priv->page_offset) in dataflash_read()
244 + ((unsigned)from % priv->page_size); in dataflash_read()
315 pageaddr = ((unsigned)to / priv->page_size); in dataflash_write()
[all …]
Dspear_smi.c202 u32 page_size; member
680 u32 page_offset, page_size; in spear_mtd_write() local
695 page_offset = (u32)to % flash->page_size; in spear_mtd_write()
698 if (page_offset + len <= flash->page_size) { in spear_mtd_write()
706 page_size = flash->page_size - page_offset; in spear_mtd_write()
709 page_size); in spear_mtd_write()
713 *retlen += page_size; in spear_mtd_write()
716 for (i = page_size; i < len; i += page_size) { in spear_mtd_write()
717 page_size = len - i; in spear_mtd_write()
718 if (page_size > flash->page_size) in spear_mtd_write()
[all …]
/drivers/staging/rtl8723bs/hal/
Dhal_sdio.c63 u32 page_size; in rtw_hal_set_sdio_tx_max_length() local
66 rtw_hal_get_def_var(padapter, HAL_DEF_TX_PAGE_SIZE, &page_size); in rtw_hal_set_sdio_tx_max_length()
68 lenHQ = ((numHQ + numPubQ) >> 1) * page_size; in rtw_hal_set_sdio_tx_max_length()
69 lenNQ = ((numNQ + numPubQ) >> 1) * page_size; in rtw_hal_set_sdio_tx_max_length()
70 lenLQ = ((numLQ + numPubQ) >> 1) * page_size; in rtw_hal_set_sdio_tx_max_length()
/drivers/block/
Dps3vram.c63 unsigned int page_size; member
325 if (ps3vram_upload(dev, CACHE_OFFSET + entry * cache->page_size, in ps3vram_cache_evict()
327 cache->page_size / DMA_PAGE_SIZE) < 0) { in ps3vram_cache_evict()
330 entry * cache->page_size, cache->tags[entry].address, in ps3vram_cache_evict()
331 cache->page_size); in ps3vram_cache_evict()
344 CACHE_OFFSET + entry * cache->page_size, in ps3vram_cache_load()
346 cache->page_size / DMA_PAGE_SIZE) < 0) { in ps3vram_cache_load()
349 address, entry * cache->page_size, cache->page_size); in ps3vram_cache_load()
380 offset = (unsigned int) (address & (cache->page_size - 1)); in ps3vram_cache_match()
410 priv->cache.page_size = CACHE_PAGE_SIZE; in ps3vram_cache_init()
[all …]
/drivers/memstick/core/
Dms_block.c433 msb->page_size); in h_msb_read_page()
441 msb->current_sg_offset += msb->page_size; in h_msb_read_page()
452 msb->current_sg_offset += msb->page_size; in h_msb_read_page()
559 msb->page_size) < msb->page_size) in h_msb_write_block()
569 msb->current_sg_offset += msb->page_size; in h_msb_write_block()
863 size_t len = msb->page_size; in msb_read_page()
983 NULL, &sg, page * msb->page_size); in msb_verify_block()
1000 BUG_ON(sg->length < msb->page_size); in msb_write_block()
1176 p->attr.page_size = be16_to_cpu(p->attr.page_size); in msb_fix_boot_page_endianness()
1272 page = data_offset / msb->page_size; in msb_read_bad_block_table()
[all …]
Dmspro_block.c74 __be16 page_size; member
144 unsigned short page_size; member
341 be16_to_cpu(x_sys->page_size)); in mspro_block_attr_show_sysinfo()
608 / msb->page_size)) { in h_mspro_block_transfer_data()
632 t_offset += msb->current_page * msb->page_size; in h_mspro_block_transfer_data()
637 msb->page_size, offset_in_page(t_offset)); in h_mspro_block_transfer_data()
676 .data_count = cpu_to_be16((uint16_t)(length / msb->page_size)), in h_mspro_block_setup_cmd()
682 do_div(offset, msb->page_size); in h_mspro_block_setup_cmd()
758 / msb->page_size; in mspro_block_complete_req()
763 t_len *= msb->page_size; in mspro_block_complete_req()
[all …]
Dms_block.h79 unsigned short page_size; member
112 unsigned short page_size; member
170 unsigned short page_size; member
/drivers/net/wireless/realtek/rtw88/
Dfw.c490 static inline u8 rtw_len_to_page(unsigned int len, u8 page_size) in rtw_len_to_page() argument
492 return DIV_ROUND_UP(len, page_size); in rtw_len_to_page()
495 static void rtw_rsvd_page_list_to_buf(struct rtw_dev *rtwdev, u8 page_size, in rtw_rsvd_page_list_to_buf() argument
502 memcpy(buf + page_margin + page_size * (page - 1), in rtw_rsvd_page_list_to_buf()
596 pg_size = rtwdev->chip->page_size; in rtw_download_drv_rsvd_page()
615 u8 page_size, page_margin, tx_desc_sz; in rtw_build_rsvd_page() local
618 page_size = chip->page_size; in rtw_build_rsvd_page()
620 page_margin = page_size - tx_desc_sz; in rtw_build_rsvd_page()
652 page_size); in rtw_build_rsvd_page()
654 total_page += rtw_len_to_page(iter->len, page_size); in rtw_build_rsvd_page()
[all …]
/drivers/net/ethernet/huawei/hinic/
Dhinic_hw_eqs.c61 #define PAGE_IN_4K(page_size) ((page_size) >> 12) argument
62 #define EQ_SET_HW_PAGE_SIZE_VAL(eq) (ilog2(PAGE_IN_4K((eq)->page_size)))
588 eq->page_size, in alloc_eq_pages()
618 dma_free_coherent(&pdev->dev, eq->page_size, in alloc_eq_pages()
640 dma_free_coherent(&pdev->dev, eq->page_size, in free_eq_pages()
661 enum hinic_eq_type type, int q_id, u32 q_len, u32 page_size, in init_eq() argument
671 eq->page_size = page_size; in init_eq()
689 eq->num_pages = GET_EQ_NUM_PAGES(eq, page_size); in init_eq()
690 eq->num_elem_in_pg = GET_EQ_NUM_ELEMS_IN_PG(eq, page_size); in init_eq()
782 int num_aeqs, u32 q_len, u32 page_size, in hinic_aeqs_init() argument
[all …]
Dhinic_hw_eqs.h178 u32 page_size; member
245 int num_aeqs, u32 q_len, u32 page_size,
251 int num_ceqs, u32 q_len, u32 page_size,
/drivers/misc/eeprom/
Dat24.c87 u16 page_size; member
345 next_page = roundup(offset + 1, at24->page_size); in at24_adjust_write_count()
561 u32 byte_len, page_size, flags, addrw; in at24_probe() local
580 err = device_property_read_u32(dev, "pagesize", &page_size); in at24_probe()
587 page_size = 1; in at24_probe()
618 page_size = 1; in at24_probe()
620 if (!page_size) { in at24_probe()
625 if (!is_power_of_2(page_size)) in at24_probe()
658 at24->page_size = page_size; in at24_probe()
672 page_size, at24_io_limit); in at24_probe()
/drivers/infiniband/hw/hns/
Dhns_roce_qp.c356 u32 page_size; in hns_roce_set_user_sq_size() local
405 page_size = 1 << (hr_dev->caps.mtt_buf_pg_sz + PAGE_SHIFT); in hns_roce_set_user_sq_size()
407 max(page_size / (1 << hr_qp->sge.sge_shift), ex_sge_num) : 0; in hns_roce_set_user_sq_size()
409 hr_qp->rq.wqe_shift), page_size) + in hns_roce_set_user_sq_size()
411 hr_qp->sge.sge_shift), page_size) + in hns_roce_set_user_sq_size()
413 hr_qp->sq.wqe_shift), page_size); in hns_roce_set_user_sq_size()
420 page_size); in hns_roce_set_user_sq_size()
424 page_size); in hns_roce_set_user_sq_size()
429 page_size); in hns_roce_set_user_sq_size()
441 int page_size = 1 << page_shift; in split_wqe_buf_region() local
[all …]
/drivers/misc/mic/host/
Dmic_smpt.c27 return mdev->smpt->info.base + (index * mdev->smpt->info.page_size); in mic_smpt_to_pa()
38 mdev->smpt->info.page_size); in mic_smpt_align_low()
43 return ALIGN(pa, mdev->smpt->info.page_size); in mic_smpt_align_high()
49 return mdev->smpt->info.num_reg * mdev->smpt->info.page_size; in mic_max_system_memory()
73 addr += smpt_info->info.page_size) { in mic_add_smpt_entry()
104 addr += smpt_info->info.page_size; in mic_smpt_op()
362 dma_addr = i * smpt_info->info.page_size; in mic_smpt_init()
/drivers/infiniband/hw/mlx5/
Dmem.c201 u64 page_size; in mlx5_ib_get_buf_offset() local
207 page_size = (u64)1 << page_shift; in mlx5_ib_get_buf_offset()
208 page_mask = page_size - 1; in mlx5_ib_get_buf_offset()
210 off_size = page_size >> 6; in mlx5_ib_get_buf_offset()
/drivers/mtd/nand/raw/
Dsh_flctl.c234 if (flctl->page_size) { in set_addr()
346 if (flctl->page_size) in wait_recfifo_ready()
544 if (flctl->page_size) in set_cmd_regs()
626 page_sectors = flctl->page_size ? 4 : 1; in execmd_read_page_sector()
672 int page_sectors = flctl->page_size ? 4 : 1; in execmd_read_oob()
696 page_sectors = flctl->page_size ? 4 : 1; in execmd_write_page_sector()
722 page_sectors = flctl->page_size ? 4 : 1; in execmd_write_oob()
759 if (flctl->page_size) in flctl_cmdfunc()
780 if (flctl->page_size) { in flctl_cmdfunc()
795 if (flctl->page_size) in flctl_cmdfunc()
[all …]
/drivers/mtd/nand/raw/brcmnand/
Dbrcmnand.c213 unsigned int page_size; member
987 int sectors = cfg->page_size / (512 << cfg->sector_size_1k); in brcmnand_hamming_ooblayout_ecc()
1005 int sectors = cfg->page_size / (512 << cfg->sector_size_1k); in brcmnand_hamming_ooblayout_free()
1024 if (cfg->page_size > 512) in brcmnand_hamming_ooblayout_free()
1045 int sectors = cfg->page_size / (512 << cfg->sector_size_1k); in brcmnand_bch_ooblayout_ecc()
1063 int sectors = cfg->page_size / (512 << cfg->sector_size_1k); in brcmnand_bch_ooblayout_free_lp()
1122 int sectors = p->page_size / (512 << p->sector_size_1k); in brcmstb_choose_ecc_layout()
1140 if (p->page_size == 512) in brcmstb_choose_ecc_layout()
2082 u8 block_size = 0, page_size = 0, device_size = 0; in brcmnand_set_cfg() local
2113 if (ctrl->page_sizes[i] == cfg->page_size) { in brcmnand_set_cfg()
[all …]
/drivers/usb/gadget/udc/bdc/
Dbdc_core.c363 u32 page_size; in bdc_mem_alloc() local
369 page_size = BDC_PGS(bdc_readl(bdc->regs, BDC_BDCCFG0)); in bdc_mem_alloc()
371 page_size = 1 << page_size; in bdc_mem_alloc()
373 page_size <<= 10; in bdc_mem_alloc()
374 dev_dbg(bdc->dev, "page_size=%d\n", page_size); in bdc_mem_alloc()
379 16, page_size); in bdc_mem_alloc()
/drivers/input/touchscreen/
Dwdt87xx_i2c.c693 int page_size; in wdt87xx_write_firmware() local
717 page_size = min_t(u32, size, PG_SIZE); in wdt87xx_write_firmware()
718 size -= page_size; in wdt87xx_write_firmware()
732 page_size); in wdt87xx_write_firmware()
736 start_addr, page_size); in wdt87xx_write_firmware()
741 start_addr, page_size); in wdt87xx_write_firmware()
745 start_addr, page_size); in wdt87xx_write_firmware()
750 wdt87xx_calculate_checksum(data, page_size); in wdt87xx_write_firmware()
766 start_addr = start_addr + page_size; in wdt87xx_write_firmware()
767 data = data + page_size; in wdt87xx_write_firmware()
/drivers/infiniband/hw/cxgb3/
Diwch_qp.c166 V_FR_PAGE_SIZE(ilog2(wr->mr->page_size) - 12) | in build_memreg()
202 u32 num_sgle, u32 * pbl_addr, u8 * page_size) in iwch_sgl2pbl_map() argument
239 ((1UL << (12 + mhp->attr.page_size)) - 1); in iwch_sgl2pbl_map()
242 (offset >> (12 + mhp->attr.page_size)); in iwch_sgl2pbl_map()
243 page_size[i] = mhp->attr.page_size; in iwch_sgl2pbl_map()
253 u8 page_size[T3_MAX_SGE]; in build_rdma_recv() local
256 page_size); in build_rdma_recv()
259 wqe->recv.pagesz[0] = page_size[0]; in build_rdma_recv()
260 wqe->recv.pagesz[1] = page_size[1]; in build_rdma_recv()
261 wqe->recv.pagesz[2] = page_size[2]; in build_rdma_recv()
[all …]

1234567