s390/Kconfig: sort config S390 select list once again
[linux-2.6-microblaze.git] / include / linux / memremap.h
index e586274..79c49e7 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MEMREMAP_H_
 #define _LINUX_MEMREMAP_H_
+#include <linux/range.h>
 #include <linux/ioport.h>
 #include <linux/percpu-refcount.h>
 
@@ -93,7 +94,6 @@ struct dev_pagemap_ops {
 /**
  * struct dev_pagemap - metadata for ZONE_DEVICE mappings
  * @altmap: pre-allocated/reserved memory for vmemmap allocations
- * @res: physical address range covered by @ref
  * @ref: reference count that pins the devm_memremap_pages() mapping
  * @internal_ref: internal reference if @ref is not provided by the caller
  * @done: completion for @internal_ref
@@ -103,10 +103,12 @@ struct dev_pagemap_ops {
  * @owner: an opaque pointer identifying the entity that manages this
  *     instance.  Used by various helpers to make sure that no
  *     foreign ZONE_DEVICE memory is accessed.
+ * @nr_range: number of ranges to be mapped
+ * @range: range to be mapped when nr_range == 1
+ * @ranges: array of ranges to be mapped when nr_range > 1
  */
 struct dev_pagemap {
        struct vmem_altmap altmap;
-       struct resource res;
        struct percpu_ref *ref;
        struct percpu_ref internal_ref;
        struct completion done;
@@ -114,6 +116,11 @@ struct dev_pagemap {
        unsigned int flags;
        const struct dev_pagemap_ops *ops;
        void *owner;
+       int nr_range;
+       union {
+               struct range range;
+               struct range ranges[0];
+       };
 };
 
 static inline struct vmem_altmap *pgmap_altmap(struct dev_pagemap *pgmap)