1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2016 - 2018 Intel Corporation. All rights reserved. */
5 #include <linux/device.h>
6 #include <linux/range.h>
12 void dax_region_put(struct dax_region *dax_region);
14 #define IORESOURCE_DAX_STATIC (1UL << 0)
15 struct dax_region *alloc_dax_region(struct device *parent, int region_id,
16 struct range *range, int target_node, unsigned int align,
20 struct dax_region *dax_region;
21 struct dev_pagemap *pgmap;
26 struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data);
28 struct dax_device_driver {
29 struct device_driver drv;
32 int (*probe)(struct dev_dax *dev);
33 void (*remove)(struct dev_dax *dev);
36 int __dax_driver_register(struct dax_device_driver *dax_drv,
37 struct module *module, const char *mod_name);
38 #define dax_driver_register(driver) \
39 __dax_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
40 void dax_driver_unregister(struct dax_device_driver *dax_drv);
41 void kill_dev_dax(struct dev_dax *dev_dax);
42 bool static_dev_dax(struct dev_dax *dev_dax);
45 * While run_dax() is potentially a generic operation that could be
46 * defined in include/linux/dax.h we don't want to grow any users
47 * outside of drivers/dax/
49 void run_dax(struct dax_device *dax_dev);
51 #define MODULE_ALIAS_DAX_DEVICE(type) \
52 MODULE_ALIAS("dax:t" __stringify(type) "*")
53 #define DAX_DEVICE_MODALIAS_FMT "dax:t%d"
55 #endif /* __DAX_BUS_H__ */