/openbmc/linux/tools/testing/selftests/mm/ |
H A D | hugetlb-madvise.c | 58 void write_fault_pages(void *addr, unsigned long nr_pages) in write_fault_pages() argument 62 for (i = 0; i < nr_pages; i++) in write_fault_pages() 66 void read_fault_pages(void *addr, unsigned long nr_pages) in read_fault_pages() argument 71 for (i = 0; i < nr_pages; i++) { in read_fault_pages()
|
/openbmc/linux/include/linux/ |
H A D | rmap.h | 385 unsigned long nr_pages; member 398 .nr_pages = compound_nr(_page), \ 408 .nr_pages = folio_nr_pages(_folio), \ 439 int pfn_mkclean_range(unsigned long pfn, unsigned long nr_pages, pgoff_t pgoff,
|
/openbmc/linux/drivers/hv/ |
H A D | hv_balloon.c | 611 unsigned long nr_pages) in hv_page_offline_check() argument 617 while (pfn < start_pfn + nr_pages) { in hv_page_offline_check() 626 (pfn < start_pfn + nr_pages)) { in hv_page_offline_check() 661 mem->nr_pages); in hv_memory_notifier() 1103 unsigned long nr_pages = totalram_pages(); in compute_balloon_floor() local 1116 if (nr_pages < MB2PAGES(128)) in compute_balloon_floor() 1117 min_pages = MB2PAGES(8) + (nr_pages >> 1); in compute_balloon_floor() 1118 else if (nr_pages < MB2PAGES(512)) in compute_balloon_floor() 1119 min_pages = MB2PAGES(40) + (nr_pages >> 2); in compute_balloon_floor() 1120 else if (nr_pages < MB2PAGES(2048)) in compute_balloon_floor() [all …]
|
/openbmc/linux/arch/mips/mm/ |
H A D | ioremap.c | 25 static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages, in __ioremap_check_ram() argument 30 for (i = 0; i < nr_pages; i++) { in __ioremap_check_ram()
|
/openbmc/linux/drivers/nvdimm/ |
H A D | pmem.c | 244 long nr_pages, enum dax_access_mode mode, void **kaddr, in __pmem_direct_access() argument 249 unsigned int num = PFN_PHYS(nr_pages) >> SECTOR_SHIFT; in __pmem_direct_access() 274 sector, nr_pages, first_bad, actual_nr); in __pmem_direct_access() 285 return nr_pages; in __pmem_direct_access() 295 size_t nr_pages) in pmem_dax_zero_page_range() argument 305 pgoff_t pgoff, long nr_pages, enum dax_access_mode mode, in pmem_dax_direct_access() argument 310 return __pmem_direct_access(pmem, pgoff, nr_pages, mode, kaddr, pfn); in pmem_dax_direct_access() 435 unsigned long pfn, unsigned long nr_pages, int mf_flags) in pmem_pagemap_memory_failure() argument 440 u64 len = nr_pages << PAGE_SHIFT; in pmem_pagemap_memory_failure()
|
/openbmc/linux/arch/s390/mm/ |
H A D | init.c | 263 mem_data.end = mem_data.start + (arg->nr_pages << PAGE_SHIFT); in s390_cma_mem_notifier() 308 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_remove_memory() local 310 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/openbmc/linux/arch/x86/kvm/ |
H A D | kvm_onhyperv.c | 95 int hv_flush_remote_tlbs_range(struct kvm *kvm, gfn_t start_gfn, gfn_t nr_pages) in hv_flush_remote_tlbs_range() argument 99 .pages = nr_pages, in hv_flush_remote_tlbs_range()
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | book3s_hv_builtin.c | 58 struct page *kvm_alloc_hpt_cma(unsigned long nr_pages) in kvm_alloc_hpt_cma() argument 60 VM_BUG_ON(order_base_2(nr_pages) < KVM_CMA_CHUNK_ORDER - PAGE_SHIFT); in kvm_alloc_hpt_cma() 62 return cma_alloc(kvm_cma, nr_pages, order_base_2(HPT_ALIGN_PAGES), in kvm_alloc_hpt_cma() 67 void kvm_free_hpt_cma(struct page *page, unsigned long nr_pages) in kvm_free_hpt_cma() argument 69 cma_release(kvm_cma, page, nr_pages); in kvm_free_hpt_cma()
|
/openbmc/linux/mm/ |
H A D | vmscan.c | 1727 unsigned int nr_pages; in shrink_folio_list() local 1938 nr_pages = 1; in shrink_folio_list() 1996 nr_pages); in shrink_folio_list() 2129 if (nr_pages > 1) { in shrink_folio_list() 2131 nr_pages = 1; in shrink_folio_list() 2327 total_scan += nr_pages; in isolate_lru_folios() 2343 scan += nr_pages; in isolate_lru_folios() 2364 nr_taken += nr_pages; in isolate_lru_folios() 2541 nr_moved += nr_pages; in move_folios_to_lru() 4350 VM_WARN_ON_ONCE(walk && memchr_inv(walk->nr_pages, 0, sizeof(walk->nr_pages))); in clear_mm_walk() [all …]
|
H A D | page-writeback.c | 274 unsigned long nr_pages = 0; in node_dirtyable_memory() local 283 nr_pages += zone_page_state(zone, NR_FREE_PAGES); in node_dirtyable_memory() 291 nr_pages -= min(nr_pages, pgdat->totalreserve_pages); in node_dirtyable_memory() 296 return nr_pages; in node_dirtyable_memory() 309 unsigned long nr_pages; in highmem_dirtyable_memory() local 318 nr_pages = zone_page_state(z, NR_FREE_PAGES); in highmem_dirtyable_memory() 320 nr_pages -= min(nr_pages, high_wmark_pages(z)); in highmem_dirtyable_memory() 323 x += nr_pages; in highmem_dirtyable_memory() 487 unsigned long nr_pages = 0; in node_dirty_ok() local 490 nr_pages += node_page_state(pgdat, NR_WRITEBACK); in node_dirty_ok() [all …]
|
/openbmc/linux/arch/sh/mm/ |
H A D | init.c | 404 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_add_memory() local 411 ret = __add_pages(nid, start_pfn, nr_pages, params); in arch_add_memory() 421 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_remove_memory() local 423 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()
|
/openbmc/linux/fs/btrfs/ |
H A D | zstd.c | 380 int nr_pages = 0; in zstd_compress_pages() local 417 pages[nr_pages++] = out_page; in zstd_compress_pages() 453 if (nr_pages == nr_dest_pages) { in zstd_compress_pages() 462 pages[nr_pages++] = out_page; in zstd_compress_pages() 510 if (nr_pages == nr_dest_pages) { in zstd_compress_pages() 519 pages[nr_pages++] = out_page; in zstd_compress_pages() 534 *out_pages = nr_pages; in zstd_compress_pages()
|
/openbmc/linux/drivers/accel/qaic/ |
H A D | qaic_control.c | 198 unsigned long nr_pages; member 333 for (i = 0; i < xfer->nr_pages; ++i) in free_dma_xfers() 398 unsigned long nr_pages; in find_and_map_user_pages() local 421 nr_pages = need_pages; in find_and_map_user_pages() 426 nr_pages = nr_pages / 2; in find_and_map_user_pages() 427 if (!nr_pages) in find_and_map_user_pages() 437 if (ret != nr_pages) { in find_and_map_user_pages() 438 nr_pages = ret; in find_and_map_user_pages() 463 xfer->nr_pages = nr_pages; in find_and_map_user_pages() 472 for (i = 0; i < nr_pages; ++i) in find_and_map_user_pages() [all …]
|
/openbmc/linux/drivers/edac/ |
H A D | i82975x_edac.c | 366 u32 cumul_size, nr_pages; in i82975x_init_csrows() local 396 nr_pages = cumul_size - last_cumul_size; in i82975x_init_csrows() 397 if (!nr_pages) in i82975x_init_csrows() 409 dimm->nr_pages = nr_pages / csrow->nr_channels; in i82975x_init_csrows()
|
H A D | amd76x_edac.c | 209 dimm->nr_pages = (mba_mask + 1) >> PAGE_SHIFT; in amd76x_init_csrows() 210 csrow->last_page = csrow->first_page + dimm->nr_pages - 1; in amd76x_init_csrows() 212 dimm->grain = dimm->nr_pages << PAGE_SHIFT; in amd76x_init_csrows()
|
H A D | edac_mc.c | 94 if (!dimm->nr_pages) in edac_mc_dump_dimm() 104 edac_dbg(4, " dimm->nr_pages = 0x%x\n", dimm->nr_pages); in edac_mc_dump_dimm() 616 u32 nr_pages = 0; in edac_mc_add_mc_with_groups() local 620 nr_pages += csrow->channels[j]->dimm->nr_pages; in edac_mc_add_mc_with_groups() 621 if (!nr_pages) in edac_mc_add_mc_with_groups() 625 if (csrow->channels[j]->dimm->nr_pages) in edac_mc_add_mc_with_groups() 766 n += dimm->nr_pages; in edac_mc_find_csrow_by_page() 1038 if (!dimm->nr_pages) in edac_mc_handle_error()
|
H A D | armada_xp_edac.c | 251 dimm->nr_pages = 524288; in axp_mc_read_config() 254 dimm->nr_pages = 65536; in axp_mc_read_config() 257 dimm->nr_pages = 131072; in axp_mc_read_config() 260 dimm->nr_pages = 262144; in axp_mc_read_config() 263 dimm->nr_pages = 1048576; in axp_mc_read_config() 266 dimm->nr_pages = 2097152; in axp_mc_read_config()
|
H A D | i82875p_edac.c | 349 u32 cumul_size, nr_pages; in i82875p_init_csrows() local 372 nr_pages = cumul_size - last_cumul_size; in i82875p_init_csrows() 378 dimm->nr_pages = nr_pages / nr_chans; in i82875p_init_csrows()
|
H A D | i3000_edac.c | 314 unsigned long last_cumul_size, nr_pages; in i3000_probe1() local 404 nr_pages = cumul_size - last_cumul_size; in i3000_probe1() 410 dimm->nr_pages = nr_pages / nr_channels; in i3000_probe1()
|
/openbmc/linux/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_shmem.c | 103 unsigned long nr_pages; in shmem_sg_alloc_table() local 154 nr_pages = min_t(unsigned long, in shmem_sg_alloc_table() 163 sg_set_folio(sg, folio, nr_pages * PAGE_SIZE, 0); in shmem_sg_alloc_table() 166 sg->length += nr_pages * PAGE_SIZE; in shmem_sg_alloc_table() 168 next_pfn = folio_pfn(folio) + nr_pages; in shmem_sg_alloc_table() 169 i += nr_pages - 1; in shmem_sg_alloc_table()
|
/openbmc/linux/arch/x86/mm/ |
H A D | init_64.c | 955 ret = __add_pages(nid, start_pfn, nr_pages, params); in add_pages() 960 nr_pages << PAGE_SHIFT); in add_pages() 969 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_add_memory() local 973 return add_pages(nid, start_pfn, nr_pages, params); in arch_add_memory() 979 unsigned int nr_pages = 1 << order; in free_pagetable() local 987 while (nr_pages--) in free_pagetable() 990 while (nr_pages--) in free_pagetable() 1262 unsigned long nr_pages = size >> PAGE_SHIFT; in arch_remove_memory() local 1264 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory() 1560 struct page *start_page, unsigned long nr_pages) in register_page_bootmem_memmap() argument [all …]
|
/openbmc/linux/arch/alpha/mm/ |
H A D | init.c | 196 unsigned long nr_pages = 0; in callback_init() local 202 nr_pages += crb->map[i].count; in callback_init() 206 console_remap_vm.size = nr_pages << PAGE_SHIFT; in callback_init()
|
/openbmc/linux/drivers/net/ethernet/chelsio/libcxgb/ |
H A D | libcxgb_ppm.c | 246 int cxgbi_ppm_ppods_reserve(struct cxgbi_ppm *ppm, unsigned short nr_pages, in cxgbi_ppm_ppods_reserve() argument 256 npods = (nr_pages + PPOD_PAGES_MAX - 1) >> PPOD_PAGES_SHIFT; in cxgbi_ppm_ppods_reserve() 259 __func__, nr_pages, npods); in cxgbi_ppm_ppods_reserve() 270 nr_pages, npods, ppm->next, caller_data); in cxgbi_ppm_ppods_reserve() 286 nr_pages, tag, idx, npods, caller_data); in cxgbi_ppm_ppods_reserve()
|
/openbmc/linux/arch/powerpc/mm/ |
H A D | init_64.c | 336 unsigned long nr_pages, addr; in __vmemmap_free() local 353 nr_pages = 1 << page_order; in __vmemmap_free() 357 vmem_altmap_free(altmap, nr_pages); in __vmemmap_free() 367 while (nr_pages--) in __vmemmap_free()
|
/openbmc/linux/block/ |
H A D | bio-integrity.c | 218 unsigned int len, nr_pages; in bio_integrity_prep() local 254 nr_pages = end - start; in bio_integrity_prep() 257 bip = bio_integrity_alloc(bio, GFP_NOIO, nr_pages); in bio_integrity_prep() 272 for (i = 0; i < nr_pages && len > 0; i++) { in bio_integrity_prep()
|