Lines Matching refs:pfn

81 static void cma_clear_bitmap(struct cma *cma, unsigned long pfn,  in cma_clear_bitmap()  argument
87 bitmap_no = (pfn - cma->base_pfn) >> cma->order_per_bit; in cma_clear_bitmap()
97 unsigned long base_pfn = cma->base_pfn, pfn; in cma_activate_area() local
111 for (pfn = base_pfn + 1; pfn < base_pfn + cma->count; pfn++) { in cma_activate_area()
112 WARN_ON_ONCE(!pfn_valid(pfn)); in cma_activate_area()
113 if (page_zone(pfn_to_page(pfn)) != zone) in cma_activate_area()
117 for (pfn = base_pfn; pfn < base_pfn + cma->count; in cma_activate_area()
118 pfn += pageblock_nr_pages) in cma_activate_area()
119 init_cma_reserved_pageblock(pfn_to_page(pfn)); in cma_activate_area()
134 for (pfn = base_pfn; pfn < base_pfn + cma->count; pfn++) in cma_activate_area()
135 free_reserved_page(pfn_to_page(pfn)); in cma_activate_area()
430 unsigned long pfn = -1; in cma_alloc() local
473 pfn = cma->base_pfn + (bitmap_no << cma->order_per_bit); in cma_alloc()
474 ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA, in cma_alloc()
478 page = pfn_to_page(pfn); in cma_alloc()
482 cma_clear_bitmap(cma, pfn, count); in cma_alloc()
487 __func__, pfn_to_page(pfn)); in cma_alloc()
489 trace_cma_alloc_busy_retry(cma->name, pfn, pfn_to_page(pfn), in cma_alloc()
495 trace_cma_alloc_finish(cma->name, pfn, page, count, align); in cma_alloc()
530 unsigned long pfn; in cma_pages_valid() local
535 pfn = page_to_pfn(pages); in cma_pages_valid()
537 if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count) { in cma_pages_valid()
559 unsigned long pfn; in cma_release() local
566 pfn = page_to_pfn(pages); in cma_release()
568 VM_BUG_ON(pfn + count > cma->base_pfn + cma->count); in cma_release()
570 free_contig_range(pfn, count); in cma_release()
571 cma_clear_bitmap(cma, pfn, count); in cma_release()
572 trace_cma_release(cma->name, pfn, pages, count); in cma_release()