device-dax: Kill dax_region base
authorDan Williams <dan.j.williams@intel.com>
Wed, 19 Jul 2017 22:57:44 +0000 (15:57 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 7 Jan 2019 05:24:46 +0000 (21:24 -0800)
Nothing consumes this attribute of a region and devres otherwise
remembers the value for de-allocation purposes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dax/dax-private.h
drivers/dax/device-dax.h
drivers/dax/device.c
drivers/dax/pmem.c

index d1b36a42132f5233b20d6d6dc5c8537f4b3c8f10..9b393c218fe4d3bdf54a23861b9181f8a27016f6 100644 (file)
@@ -19,7 +19,6 @@
 /**
  * struct dax_region - mapping infrastructure for dax devices
  * @id: kernel-wide unique region for a memory range
- * @base: linear address corresponding to @res
  * @kref: to pin while other agents have a need to do lookups
  * @dev: parent device backing this region
  * @align: allocation and mapping alignment for child dax devices
@@ -28,7 +27,6 @@
  */
 struct dax_region {
        int id;
-       void *base;
        struct kref kref;
        struct device *dev;
        unsigned int align;
index 688b051750bd7cc615849491605bc0ecf50d9101..4f1c69e1b3a2448be38f81e80533e4b8c7d97587 100644 (file)
@@ -17,9 +17,8 @@ struct dev_dax;
 struct resource;
 struct dax_region;
 void dax_region_put(struct dax_region *dax_region);
-struct dax_region *alloc_dax_region(struct device *parent,
-               int region_id, struct resource *res, unsigned int align,
-               void *addr, unsigned long flags);
+struct dax_region *alloc_dax_region(struct device *parent, int region_id,
+               struct resource *res, unsigned int align, unsigned long flags);
 struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region,
                int id, struct resource *res, int count);
 #endif /* __DEVICE_DAX_H__ */
index a5a670c1cd58f3e53df767949ec33a8b0baf7517..811c1015194c91e55e7e5e4041f8b9e50059a8ee 100644 (file)
@@ -100,7 +100,7 @@ static void dax_region_unregister(void *region)
 }
 
 struct dax_region *alloc_dax_region(struct device *parent, int region_id,
-               struct resource *res, unsigned int align, void *addr,
+               struct resource *res, unsigned int align,
                unsigned long pfn_flags)
 {
        struct dax_region *dax_region;
@@ -130,7 +130,6 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
        dax_region->id = region_id;
        dax_region->align = align;
        dax_region->dev = parent;
-       dax_region->base = addr;
        if (sysfs_create_groups(&parent->kobj, dax_region_attribute_groups)) {
                kfree(dax_region);
                return NULL;
index 2c1f459c0c63aab5a2ad1e7089c06ff7556f19c9..72a76105eb024f7e58cee47770fcfa882b3e228a 100644 (file)
@@ -125,7 +125,7 @@ static int dax_pmem_probe(struct device *dev)
                return -EINVAL;
 
        dax_region = alloc_dax_region(dev, region_id, &res,
-                       le32_to_cpu(pfn_sb->align), addr, PFN_DEV|PFN_MAP);
+                       le32_to_cpu(pfn_sb->align), PFN_DEV|PFN_MAP);
        if (!dax_region)
                return -ENOMEM;