Searched refs:cma (Results 1 – 6 of 6) sorted by relevance
/mm/ |
D | cma.c | 48 struct cma cma_areas[MAX_CMA_AREAS]; 52 phys_addr_t cma_get_base(const struct cma *cma) in cma_get_base() argument 54 return PFN_PHYS(cma->base_pfn); in cma_get_base() 57 unsigned long cma_get_size(const struct cma *cma) in cma_get_size() argument 59 return cma->count << PAGE_SHIFT; in cma_get_size() 62 const char *cma_get_name(const struct cma *cma) in cma_get_name() argument 64 return cma->name; in cma_get_name() 68 static unsigned long cma_bitmap_aligned_mask(const struct cma *cma, in cma_bitmap_aligned_mask() argument 71 if (align_order <= cma->order_per_bit) in cma_bitmap_aligned_mask() 73 return (1UL << (align_order - cma->order_per_bit)) - 1; in cma_bitmap_aligned_mask() [all …]
|
D | cma_debug.c | 36 struct cma *cma = data; in cma_used_get() local 39 mutex_lock(&cma->lock); in cma_used_get() 41 used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma)); in cma_used_get() 42 mutex_unlock(&cma->lock); in cma_used_get() 43 *val = (u64)used << cma->order_per_bit; in cma_used_get() 51 struct cma *cma = data; in cma_maxchunk_get() local 54 unsigned long bitmap_maxno = cma_bitmap_maxno(cma); in cma_maxchunk_get() 56 mutex_lock(&cma->lock); in cma_maxchunk_get() 58 start = find_next_zero_bit(cma->bitmap, bitmap_maxno, end); in cma_maxchunk_get() 61 end = find_next_bit(cma->bitmap, bitmap_maxno, start); in cma_maxchunk_get() [all …]
|
D | cma_sysfs.c | 20 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_success_pages() argument 22 atomic64_add(nr_pages, &cma->nr_pages_succeeded); in cma_sysfs_account_success_pages() 25 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_fail_pages() argument 27 atomic64_add(nr_pages, &cma->nr_pages_failed); in cma_sysfs_account_fail_pages() 30 static inline struct cma *cma_from_kobj(struct kobject *kobj) in cma_from_kobj() 32 return container_of(kobj, struct cma_kobject, kobj)->cma; in cma_from_kobj() 38 struct cma *cma = cma_from_kobj(kobj); in alloc_pages_success_show() local 41 atomic64_read(&cma->nr_pages_succeeded)); in alloc_pages_success_show() 48 struct cma *cma = cma_from_kobj(kobj); in alloc_pages_fail_show() local 50 return sysfs_emit(buf, "%llu\n", atomic64_read(&cma->nr_pages_failed)); in alloc_pages_fail_show() [all …]
|
D | cma.h | 11 struct cma *cma; member 14 struct cma { struct 37 extern struct cma cma_areas[MAX_CMA_AREAS]; argument 40 static inline unsigned long cma_bitmap_maxno(struct cma *cma) in cma_bitmap_maxno() argument 42 return cma->count >> cma->order_per_bit; in cma_bitmap_maxno() 46 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages); 47 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages); 49 static inline void cma_sysfs_account_success_pages(struct cma *cma, in cma_sysfs_account_success_pages() argument 51 static inline void cma_sysfs_account_fail_pages(struct cma *cma, in cma_sysfs_account_fail_pages() argument
|
D | Makefile | 110 obj-$(CONFIG_CMA) += cma.o
|
D | hugetlb.c | 50 static struct cma *hugetlb_cma[MAX_NUMNODES];
|