#define pr_fmt(fmt) …
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
#include <linux/device.h>
#include <linux/ndctl.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include "nd-core.h"
#include "label.h"
#include "pmem.h"
#include "nd.h"
static DEFINE_IDA(dimm_ida);
int nvdimm_check_config_data(struct device *dev)
{ … }
static int validate_dimm(struct nvdimm_drvdata *ndd)
{ … }
int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd)
{ … }
int nvdimm_get_config_data(struct nvdimm_drvdata *ndd, void *buf,
size_t offset, size_t len)
{ … }
int nvdimm_set_config_data(struct nvdimm_drvdata *ndd, size_t offset,
void *buf, size_t len)
{ … }
void nvdimm_set_labeling(struct device *dev)
{ … }
void nvdimm_set_locked(struct device *dev)
{ … }
void nvdimm_clear_locked(struct device *dev)
{ … }
static void nvdimm_release(struct device *dev)
{ … }
struct nvdimm *to_nvdimm(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping)
{ … }
EXPORT_SYMBOL(…);
void nvdimm_drvdata_release(struct kref *kref)
{ … }
void get_ndd(struct nvdimm_drvdata *ndd)
{ … }
void put_ndd(struct nvdimm_drvdata *ndd)
{ … }
const char *nvdimm_name(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
struct kobject *nvdimm_kobj(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
void *nvdimm_provider_data(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
static ssize_t commands_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(commands);
static ssize_t flags_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(flags);
static ssize_t state_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(state);
static ssize_t __available_slots_show(struct nvdimm_drvdata *ndd, char *buf)
{ … }
static ssize_t available_slots_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(available_slots);
static ssize_t security_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t frozen_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(frozen);
static ssize_t security_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t len)
{ … }
static DEVICE_ATTR_RW(security);
static struct attribute *nvdimm_attributes[] = …;
static umode_t nvdimm_visible(struct kobject *kobj, struct attribute *a, int n)
{ … }
static const struct attribute_group nvdimm_attribute_group = …;
static ssize_t result_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_ADMIN_RO(result);
static ssize_t activate_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t activate_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t len)
{ … }
static DEVICE_ATTR_ADMIN_RW(activate);
static struct attribute *nvdimm_firmware_attributes[] = …;
static umode_t nvdimm_firmware_visible(struct kobject *kobj, struct attribute *a, int n)
{ … }
static const struct attribute_group nvdimm_firmware_attribute_group = …;
static const struct attribute_group *nvdimm_attribute_groups[] = …;
static const struct device_type nvdimm_device_type = …;
bool is_nvdimm(const struct device *dev)
{ … }
static struct lock_class_key nvdimm_key;
struct nvdimm *__nvdimm_create(struct nvdimm_bus *nvdimm_bus,
void *provider_data, const struct attribute_group **groups,
unsigned long flags, unsigned long cmd_mask, int num_flush,
struct resource *flush_wpq, const char *dimm_id,
const struct nvdimm_security_ops *sec_ops,
const struct nvdimm_fw_ops *fw_ops)
{ … }
EXPORT_SYMBOL_GPL(…);
void nvdimm_delete(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
static void shutdown_security_notify(void *data)
{ … }
int nvdimm_security_setup_events(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int nvdimm_in_overwrite(struct nvdimm *nvdimm)
{ … }
EXPORT_SYMBOL_GPL(…);
int nvdimm_security_freeze(struct nvdimm *nvdimm)
{ … }
static unsigned long dpa_align(struct nd_region *nd_region)
{ … }
resource_size_t nd_pmem_max_contiguous_dpa(struct nd_region *nd_region,
struct nd_mapping *nd_mapping)
{ … }
resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region,
struct nd_mapping *nd_mapping)
{ … }
void nvdimm_free_dpa(struct nvdimm_drvdata *ndd, struct resource *res)
{ … }
struct resource *nvdimm_allocate_dpa(struct nvdimm_drvdata *ndd,
struct nd_label_id *label_id, resource_size_t start,
resource_size_t n)
{ … }
resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
struct nd_label_id *label_id)
{ … }
static int count_dimms(struct device *dev, void *c)
{ … }
int nvdimm_bus_check_dimm_count(struct nvdimm_bus *nvdimm_bus, int dimm_count)
{ … }
EXPORT_SYMBOL_GPL(…);
void __exit nvdimm_devs_exit(void)
{ … }