Lines Matching refs:end_pfn
253 unsigned long start_pfn, unsigned long end_pfn, in save_mr() argument
256 if (start_pfn < end_pfn) { in save_mr()
260 mr[nr_range].end = end_pfn<<PAGE_SHIFT; in save_mr()
331 unsigned long start_pfn, end_pfn, limit_pfn; in split_mem_range() local
347 end_pfn = PFN_DOWN(PMD_SIZE); in split_mem_range()
349 end_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
351 end_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
353 if (end_pfn > limit_pfn) in split_mem_range()
354 end_pfn = limit_pfn; in split_mem_range()
355 if (start_pfn < end_pfn) { in split_mem_range()
356 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); in split_mem_range()
357 pfn = end_pfn; in split_mem_range()
363 end_pfn = round_down(limit_pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
365 end_pfn = round_up(pfn, PFN_DOWN(PUD_SIZE)); in split_mem_range()
366 if (end_pfn > round_down(limit_pfn, PFN_DOWN(PMD_SIZE))) in split_mem_range()
367 end_pfn = round_down(limit_pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
370 if (start_pfn < end_pfn) { in split_mem_range()
371 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, in split_mem_range()
373 pfn = end_pfn; in split_mem_range()
379 end_pfn = round_down(limit_pfn, PFN_DOWN(PUD_SIZE)); in split_mem_range()
380 if (start_pfn < end_pfn) { in split_mem_range()
381 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, in split_mem_range()
384 pfn = end_pfn; in split_mem_range()
389 end_pfn = round_down(limit_pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
390 if (start_pfn < end_pfn) { in split_mem_range()
391 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, in split_mem_range()
393 pfn = end_pfn; in split_mem_range()
399 end_pfn = limit_pfn; in split_mem_range()
400 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); in split_mem_range()
430 static void add_pfn_range_mapped(unsigned long start_pfn, unsigned long end_pfn) in add_pfn_range_mapped() argument
433 nr_pfn_mapped, start_pfn, end_pfn); in add_pfn_range_mapped()
436 max_pfn_mapped = max(max_pfn_mapped, end_pfn); in add_pfn_range_mapped()
440 min(end_pfn, 1UL<<(32-PAGE_SHIFT))); in add_pfn_range_mapped()
443 bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn) in pfn_range_is_mapped() argument
449 (end_pfn <= pfn_mapped[i].end)) in pfn_range_is_mapped()
499 unsigned long start_pfn, end_pfn; in init_range_memory_mapping() local
503 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) { in init_range_memory_mapping()
505 u64 end = clamp_val(PFN_PHYS(end_pfn), r_start, r_end); in init_range_memory_mapping()
815 unsigned long start_pfn, end_pfn; in memblock_find_dma_reserve() local
825 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) { in memblock_find_dma_reserve()
827 end_pfn = min(end_pfn, MAX_DMA_PFN); in memblock_find_dma_reserve()
829 nr_pages += end_pfn - start_pfn; in memblock_find_dma_reserve()
840 end_pfn = min_t(unsigned long, PFN_DOWN(end_addr), MAX_DMA_PFN); in memblock_find_dma_reserve()
842 if (start_pfn < end_pfn) in memblock_find_dma_reserve()
843 nr_free_pages += end_pfn - start_pfn; in memblock_find_dma_reserve()