Lines Matching refs:cma
17 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_success_pages() argument
19 atomic64_add(nr_pages, &cma->nr_pages_succeeded); in cma_sysfs_account_success_pages()
22 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_fail_pages() argument
24 atomic64_add(nr_pages, &cma->nr_pages_failed); in cma_sysfs_account_fail_pages()
27 static inline struct cma *cma_from_kobj(struct kobject *kobj) in cma_from_kobj()
29 return container_of(kobj, struct cma_kobject, kobj)->cma; in cma_from_kobj()
35 struct cma *cma = cma_from_kobj(kobj); in alloc_pages_success_show() local
38 atomic64_read(&cma->nr_pages_succeeded)); in alloc_pages_success_show()
45 struct cma *cma = cma_from_kobj(kobj); in alloc_pages_fail_show() local
47 return sysfs_emit(buf, "%llu\n", atomic64_read(&cma->nr_pages_failed)); in alloc_pages_fail_show()
53 struct cma *cma = cma_from_kobj(kobj); in cma_kobj_release() local
54 struct cma_kobject *cma_kobj = cma->cma_kobj; in cma_kobj_release()
57 cma->cma_kobj = NULL; in cma_kobj_release()
65 ATTRIBUTE_GROUPS(cma);
77 struct cma *cma; in cma_sysfs_init() local
91 cma = &cma_areas[i]; in cma_sysfs_init()
92 cma->cma_kobj = cma_kobj; in cma_sysfs_init()
93 cma_kobj->cma = cma; in cma_sysfs_init()
95 cma_kobj_root, "%s", cma->name); in cma_sysfs_init()
105 cma = &cma_areas[i]; in cma_sysfs_init()
106 kobject_put(&cma->cma_kobj->kobj); in cma_sysfs_init()