#include <linux/cma.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include "cma.h"
#define CMA_ATTR_RO(_name) …
void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages)
{ … }
void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages)
{ … }
void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages)
{ … }
static inline struct cma *cma_from_kobj(struct kobject *kobj)
{ … }
static ssize_t alloc_pages_success_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
CMA_ATTR_RO(…);
static ssize_t alloc_pages_fail_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
CMA_ATTR_RO(…);
static ssize_t release_pages_success_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
CMA_ATTR_RO(…);
static void cma_kobj_release(struct kobject *kobj)
{ … }
static struct attribute *cma_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct kobj_type cma_ktype = …;
static int __init cma_sysfs_init(void)
{ … }
subsys_initcall(cma_sysfs_init);