Lines Matching refs:count
51 return cma->count << PAGE_SHIFT; in cma_get_size()
86 unsigned int count) in cma_clear_bitmap() argument
91 bitmap_count = cma_bitmap_pages_to_bits(cma, count); in cma_clear_bitmap()
101 unsigned i = cma->count >> pageblock_order; in cma_activate_area()
141 cma->count = 0; in cma_activate_area()
210 cma->count = size >> PAGE_SHIFT; in cma_init_reserved_mem()
395 pr_cont("=> %lu free of %lu total pages\n", nr_total, cma->count); in cma_debug_show_areas()
412 struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, in cma_alloc() argument
423 if (!cma || !cma->count) in cma_alloc()
427 count, align); in cma_alloc()
429 if (!count) in cma_alloc()
435 bitmap_count = cma_bitmap_pages_to_bits(cma, count); in cma_alloc()
459 ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA, in cma_alloc()
467 cma_clear_bitmap(cma, pfn, count); in cma_alloc()
477 trace_cma_alloc(pfn, page, count, align); in cma_alloc()
485 for (i = 0; i < count; i++) in cma_alloc()
491 __func__, count, ret); in cma_alloc()
510 bool cma_release(struct cma *cma, const struct page *pages, unsigned int count) in cma_release() argument
521 if (pfn < cma->base_pfn || pfn >= cma->base_pfn + cma->count) in cma_release()
524 VM_BUG_ON(pfn + count > cma->base_pfn + cma->count); in cma_release()
526 free_contig_range(pfn, count); in cma_release()
527 cma_clear_bitmap(cma, pfn, count); in cma_release()
528 trace_cma_release(pfn, pages, count); in cma_release()