1 #ifndef _LINUX_MEMREMAP_H_
2 #define _LINUX_MEMREMAP_H_
8 * struct dev_pagemap - metadata for ZONE_DEVICE mappings
9 * @dev: host device of the mapping for debug
12 /* TODO: vmem_altmap and percpu_ref count */
16 #ifdef CONFIG_ZONE_DEVICE
17 void *devm_memremap_pages(struct device *dev, struct resource *res);
18 struct dev_pagemap *find_dev_pagemap(resource_size_t phys);
20 static inline void *devm_memremap_pages(struct device *dev,
24 * Fail attempts to call devm_memremap_pages() without
25 * ZONE_DEVICE support enabled, this requires callers to fall
26 * back to plain devm_memremap() based on config
29 return ERR_PTR(-ENXIO);
32 static inline struct dev_pagemap *find_dev_pagemap(resource_size_t phys)
38 #endif /* _LINUX_MEMREMAP_H_ */