/linux/drivers/media/pci/ivtv/ |
H A D | ivtv-udma.c | 21 dma_page->page_count = dma_page->last - dma_page->first + 1; in ivtv_udma_get_page_info() 22 if (dma_page->page_count == 1) dma_page->tail -= dma_page->offset; in ivtv_udma_get_page_info() 36 for (i = 0; i < dma_page->page_count; i++) { in ivtv_udma_fill_sg_list() 37 unsigned int len = (i == dma_page->page_count - 1) ? in ivtv_udma_fill_sg_list() 102 if (dma->SG_length || dma->page_count) { in ivtv_udma_setup() 104 dma->SG_length, dma->page_count); in ivtv_udma_setup() 110 if (user_dma.page_count <= 0) { in ivtv_udma_setup() 112 user_dma.page_count, size_in_bytes, user_dma.offset); in ivtv_udma_setup() 117 err = pin_user_pages_unlocked(user_dma.uaddr, user_dma.page_count, in ivtv_udma_setup() 120 if (user_dma.page_count != err) { in ivtv_udma_setup() [all …]
|
H A D | ivtv-yuv.c | 54 if (dma->SG_length || dma->page_count) { in ivtv_yuv_prep_user_dma() 57 dma->SG_length, dma->page_count); in ivtv_yuv_prep_user_dma() 66 y_dma.page_count, &dma->map[0], 0); in ivtv_yuv_prep_user_dma() 68 if (y_pages == y_dma.page_count) { in ivtv_yuv_prep_user_dma() 70 uv_dma.page_count, &dma->map[y_pages], 0); in ivtv_yuv_prep_user_dma() 73 if (y_pages != y_dma.page_count || uv_pages != uv_dma.page_count) { in ivtv_yuv_prep_user_dma() 76 if (y_pages == y_dma.page_count) { in ivtv_yuv_prep_user_dma() 79 uv_pages, uv_dma.page_count); in ivtv_yuv_prep_user_dma() 90 y_pages, y_dma.page_count); in ivtv_yuv_prep_user_dma() 106 dma->page_count = y_pages + uv_pages; in ivtv_yuv_prep_user_dma() [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | ksm_tests.c | 348 long page_count, int timeout, size_t page_size) in check_ksm_merge() argument 359 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in check_ksm_merge() 363 if (ksm_merge_pages(merge_type, map_ptr, page_size * page_count, start_time, timeout)) in check_ksm_merge() 367 if (assert_ksm_pages_count(page_count)) { in check_ksm_merge() 369 munmap(map_ptr, page_size * page_count); in check_ksm_merge() 377 munmap(map_ptr, page_size * page_count); in check_ksm_merge() 385 int page_count = 2; in check_ksm_unmerge() local 393 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in check_ksm_unmerge() 397 if (ksm_merge_pages(merge_type, map_ptr, page_size * page_count, start_time, timeout)) in check_ksm_unmerge() 411 munmap(map_ptr, page_size * page_count); in check_ksm_unmerge() [all …]
|
/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_bo85b5.c | 47 u32 page_count = PFN_UP(new_reg->size); in nva3_bo_move_copy() local 50 page_count = PFN_UP(new_reg->size); in nva3_bo_move_copy() 51 while (page_count) { in nva3_bo_move_copy() 52 int line_count = (page_count > 8191) ? 8191 : page_count; in nva3_bo_move_copy() 68 page_count -= line_count; in nva3_bo_move_copy()
|
H A D | nouveau_bo90b5.c | 40 u32 page_count = PFN_UP(new_reg->size); in nvc0_bo_move_copy() local 43 page_count = PFN_UP(new_reg->size); in nvc0_bo_move_copy() 44 while (page_count) { in nvc0_bo_move_copy() 45 int line_count = (page_count > 8191) ? 8191 : page_count; in nvc0_bo_move_copy() 61 page_count -= line_count; in nvc0_bo_move_copy()
|
H A D | nouveau_bo9039.c | 45 u32 page_count = PFN_UP(new_reg->size); in nvc0_bo_move_m2mf() local 48 page_count = PFN_UP(new_reg->size); in nvc0_bo_move_m2mf() 49 while (page_count) { in nvc0_bo_move_m2mf() 50 int line_count = (page_count > 2047) ? 2047 : page_count; in nvc0_bo_move_m2mf() 78 page_count -= line_count; in nvc0_bo_move_m2mf()
|
H A D | nouveau_bo0039.c | 55 u32 page_count = PFN_UP(new_reg->size); in nv04_bo_move_m2mf() local 65 page_count = PFN_UP(new_reg->size); in nv04_bo_move_m2mf() 66 while (page_count) { in nv04_bo_move_m2mf() 67 int line_count = (page_count > 2047) ? 2047 : page_count; in nv04_bo_move_m2mf() 88 page_count -= line_count; in nv04_bo_move_m2mf()
|
/linux/drivers/firewire/ |
H A D | core-iso.c | 31 int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count) in fw_iso_buffer_alloc() argument 35 buffer->page_count = 0; in fw_iso_buffer_alloc() 37 buffer->pages = kmalloc_array(page_count, sizeof(buffer->pages[0]), in fw_iso_buffer_alloc() 42 for (i = 0; i < page_count; i++) { in fw_iso_buffer_alloc() 47 buffer->page_count = i; in fw_iso_buffer_alloc() 48 if (i < page_count) { in fw_iso_buffer_alloc() 64 for (i = 0; i < buffer->page_count; i++) { in fw_iso_buffer_map_dma() 73 if (i < buffer->page_count) in fw_iso_buffer_map_dma() 80 int page_count, enum dma_data_direction direction) in fw_iso_buffer_init() argument 84 ret = fw_iso_buffer_alloc(buffer, page_count); in fw_iso_buffer_init() [all …]
|
/linux/drivers/char/agp/ |
H A D | generic.c | 181 if (curr->page_count != 0) { in agp_free_memory() 186 for (i = 0; i < curr->page_count; i++) { in agp_free_memory() 191 for (i = 0; i < curr->page_count; i++) { in agp_free_memory() 219 size_t page_count, u32 type) in agp_allocate_memory() argument 230 if ((cur_memory + page_count > bridge->max_memory_agp) || in agp_allocate_memory() 231 (cur_memory + page_count < page_count)) in agp_allocate_memory() 235 new = agp_generic_alloc_user(page_count, type); in agp_allocate_memory() 242 new = bridge->driver->alloc_by_type(page_count, type); in agp_allocate_memory() 248 scratch_pages = (page_count + ENTRIES_PER_PAGE - 1) / ENTRIES_PER_PAGE; in agp_allocate_memory() 256 if (bridge->driver->agp_alloc_pages(bridge, new, page_count)) { in agp_allocate_memory() [all …]
|
H A D | nvidia-agp.c | 210 if (mem->page_count == 0) in nvidia_insert_memory() 213 if ((pg_start + mem->page_count) > in nvidia_insert_memory() 217 for (j = pg_start; j < (pg_start + mem->page_count); j++) { in nvidia_insert_memory() 226 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in nvidia_insert_memory() 250 if (mem->page_count == 0) in nvidia_remove_memory() 253 for (i = pg_start; i < (mem->page_count + pg_start); i++) in nvidia_remove_memory()
|
H A D | intel-gtt.c | 128 DBG("try unmapping %lu pages\n", (unsigned long)mem->page_count); in intel_gtt_unmap_memory() 218 if ((pg_start + mem->page_count) in i810_insert_dcache_entries() 225 for (i = pg_start; i < (pg_start + mem->page_count); i++) { in i810_insert_dcache_entries() 270 new->page_count = pg_count; in alloc_agpphysmem_i8xx() 281 if (curr->page_count == 4) in intel_i810_free_by_type() 912 if (mem->page_count == 0) in intel_fake_agp_insert_entries() 915 if (pg_start + mem->page_count > intel_private.gtt_total_entries) in intel_fake_agp_insert_entries() 930 ret = intel_gtt_map_memory(mem->pages, mem->page_count, &st); in intel_fake_agp_insert_entries() 938 intel_gmch_gtt_insert_pages(pg_start, mem->page_count, mem->pages, in intel_fake_agp_insert_entries() 965 if (mem->page_count == 0) in intel_fake_agp_remove_entries() [all …]
|
H A D | ati-agp.c | 273 if (mem->page_count == 0) in ati_insert_memory() 276 if ((pg_start + mem->page_count) > num_entries) in ati_insert_memory() 280 while (j < (pg_start + mem->page_count)) { in ati_insert_memory() 294 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in ati_insert_memory() 319 if (mem->page_count == 0) in ati_remove_memory() 322 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in ati_remove_memory()
|
H A D | uninorth-agp.c | 166 if (mem->page_count == 0) in uninorth_insert_memory() 172 if ((pg_start + mem->page_count) > num_entries) in uninorth_insert_memory() 176 for (i = 0; i < mem->page_count; ++i) { in uninorth_insert_memory() 185 for (i = 0; i < mem->page_count; i++) { in uninorth_insert_memory() 215 if (mem->page_count == 0) in uninorth_remove_memory() 219 for (i = 0; i < mem->page_count; ++i) { in uninorth_remove_memory()
|
H A D | efficeon-agp.c | 238 int i, count = mem->page_count, num_entries; in efficeon_insert_memory() 246 if ((pg_start + mem->page_count) > num_entries) in efficeon_insert_memory() 287 int i, count = mem->page_count, num_entries; in efficeon_remove_memory() 293 if ((pg_start + mem->page_count) > num_entries) in efficeon_remove_memory()
|
H A D | agp.h | 194 struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type); 198 struct agp_memory *memory, size_t page_count); 215 struct agp_memory *agp_generic_alloc_user(size_t page_count, int type);
|
/linux/sound/soc/sof/amd/ |
H A D | acp-loader.c | 55 u32 dma_size, page_count; in acp_dsp_block_write() local 64 page_count = PAGE_ALIGN(size_fw) >> PAGE_SHIFT; in acp_dsp_block_write() 65 dma_size = page_count * ACP_PAGE_SIZE; in acp_dsp_block_write() 171 u32 page_count, dma_size; in acp_dsp_pre_fw_run() local 181 page_count = PAGE_ALIGN(size_fw) >> PAGE_SHIFT; in acp_dsp_pre_fw_run() 182 adata->fw_bin_page_count = page_count; in acp_dsp_pre_fw_run() 184 configure_pte_for_fw_loading(FW_BIN, page_count, adata); in acp_dsp_pre_fw_run() 193 src_addr = ACP_SYSTEM_MEMORY_WINDOW + (page_count * ACP_PAGE_SIZE); in acp_dsp_pre_fw_run() 208 (page_count * ACP_PAGE_SIZE); in acp_dsp_pre_fw_run()
|
/linux/arch/x86/hyperv/ |
H A D | hv_proc.c | 28 int i, j, page_count; in hv_call_deposit_pages() local 86 for (i = 0, page_count = 0; i < num_allocations; ++i) { in hv_call_deposit_pages() 88 for (j = 0; j < counts[i]; ++j, ++page_count) in hv_call_deposit_pages() 89 input_page->gpa_page_list[page_count] = base_pfn + j; in hv_call_deposit_pages() 92 page_count, 0, input_page, NULL); in hv_call_deposit_pages()
|
/linux/fs/squashfs/ |
H A D | block.c | 81 u64 read_start, u64 read_end, int page_count) in squashfs_bio_read_cached() argument 111 else if (idx == page_count - 1 && index + length != read_end) in squashfs_bio_read_cached() 200 const int page_count = DIV_ROUND_UP(total_len + offset, PAGE_SIZE); in squashfs_bio_read() local 204 bio = bio_kmalloc(page_count, GFP_NOIO); in squashfs_bio_read() 207 bio_init(bio, sb->s_bdev, bio->bi_inline_vecs, page_count, REQ_OP_READ); in squashfs_bio_read() 210 for (i = 0; i < page_count; ++i) { in squashfs_bio_read() 237 page_count); in squashfs_bio_read()
|
/linux/drivers/target/ |
H A D | target_core_rd.c | 68 u32 i, j, page_count = 0, sg_per_table; in rd_release_sgl_table() local 78 page_count++; in rd_release_sgl_table() 85 return page_count; in rd_release_sgl_table() 90 u32 page_count; in rd_release_device_space() local 95 page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_table_array, in rd_release_device_space() 100 rd_dev->rd_host->rd_host_id, rd_dev->rd_dev_id, page_count, in rd_release_device_space() 101 rd_dev->sg_table_count, (unsigned long)page_count * PAGE_SIZE); in rd_release_device_space() 216 u32 page_count; in rd_release_prot_space() local 221 page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_prot_array, in rd_release_prot_space() 226 rd_dev->rd_host->rd_host_id, rd_dev->rd_dev_id, page_count, in rd_release_prot_space() [all …]
|
/linux/fs/orangefs/ |
H A D | orangefs-bufmap.c | 152 int page_count; member 171 unpin_user_pages(bufmap->page_array, bufmap->page_count); in orangefs_bufmap_unmap() 239 bufmap->page_count = bufmap->total_size / PAGE_SIZE; in orangefs_bufmap_alloc() 243 kcalloc(bufmap->page_count, sizeof(struct page *), GFP_KERNEL); in orangefs_bufmap_alloc() 268 bufmap->page_count, FOLL_WRITE, bufmap->page_array); in orangefs_bufmap_map() 273 if (ret != bufmap->page_count) { in orangefs_bufmap_map() 275 bufmap->page_count, ret); in orangefs_bufmap_map() 288 for (i = 0; i < bufmap->page_count; i++) in orangefs_bufmap_map()
|
/linux/drivers/w1/slaves/ |
H A D | w1_ds2433.c | 44 unsigned int page_count; /* number of 256 bits pages */ member 50 .page_count = 16, 56 .page_count = 80, 94 bitmap_zero(data->validcrc, data->cfg->page_count); in w1_f23_refresh_block() 337 if (data->cfg->page_count > W1_VALIDCRC_MAX) { in w1_f23_add_slave() 347 bitmap_zero(data->validcrc, data->cfg->page_count); in w1_f23_add_slave()
|
/linux/drivers/virt/vboxguest/ |
H A D | vboxguest_utils.c | 199 u32 page_count; in hgcm_call_add_pagelist_size() local 201 page_count = hgcm_call_buf_size_in_pages(buf, len); in hgcm_call_add_pagelist_size() 202 *extra += offsetof(struct vmmdev_hgcm_pagelist, pages[page_count]); in hgcm_call_add_pagelist_size() 340 u32 i, page_count; in hgcm_call_init_linaddr() local 351 page_count = hgcm_call_buf_size_in_pages(buf, len); in hgcm_call_init_linaddr() 359 dst_pg_lst->page_count = page_count; in hgcm_call_init_linaddr() 361 for (i = 0; i < page_count; i++) { in hgcm_call_init_linaddr() 371 *off_extra += offsetof(struct vmmdev_hgcm_pagelist, pages[page_count]); in hgcm_call_init_linaddr()
|
/linux/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_shmem.c | 68 unsigned int page_count; /* restricted by sg_alloc_table */ in shmem_sg_alloc_table() local 75 if (overflows_type(size / PAGE_SIZE, page_count)) in shmem_sg_alloc_table() 78 page_count = size / PAGE_SIZE; in shmem_sg_alloc_table() 86 if (sg_alloc_table(st, page_count, GFP_KERNEL | __GFP_NOWARN)) in shmem_sg_alloc_table() 101 for (i = 0; i < page_count; i++) { in shmem_sg_alloc_table() 121 i915_gem_shrink(NULL, i915, 2 * page_count, NULL, *s++); in shmem_sg_alloc_table() 155 folio_nr_pages(folio), page_count - i); in shmem_sg_alloc_table()
|
/linux/tools/testing/radix-tree/ |
H A D | regression2.c | 61 unsigned long page_count = 0; variable 71 p->index = page_count++; in page_alloc()
|
/linux/drivers/gpu/drm/ttm/ |
H A D | ttm_agp_backend.c | 65 mem->page_count = 0; in ttm_agp_bind() 72 mem->pages[mem->page_count++] = page; in ttm_agp_bind()
|