summaryrefslogtreecommitdiffstats
path: root/include/linux/memory_hotplug.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-06-08 19:11:27 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-06-08 19:11:27 +0200
commit6e2b347d42e54282e4c6cfa08272db462b178f7f (patch)
tree7686345b2e24c406a57feffcad558484f9552366 /include/linux/memory_hotplug.h
parente54a4424925a27ed94dff046db3ce5caf4b1e748 (diff)
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
downloadcachepc-linux-6e2b347d42e54282e4c6cfa08272db462b178f7f.tar.gz
cachepc-linux-6e2b347d42e54282e4c6cfa08272db462b178f7f.zip
Merge v5.19-rc1 into drm-misc-fixes
Let's kick-off the start of the 5.19 fix cycle Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'include/linux/memory_hotplug.h')
-rw-r--r--include/linux/memory_hotplug.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 1ce6f8044f1e..20d7edf62a6a 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -15,6 +15,7 @@ struct memory_block;
struct memory_group;
struct resource;
struct vmem_altmap;
+struct dev_pagemap;
#ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION
/*
@@ -122,6 +123,7 @@ typedef int __bitwise mhp_t;
struct mhp_params {
struct vmem_altmap *altmap;
pgprot_t pgprot;
+ struct dev_pagemap *pgmap;
};
bool mhp_range_allowed(u64 start, u64 size, bool need_mapping);
@@ -333,7 +335,8 @@ extern void remove_pfn_range_from_zone(struct zone *zone,
unsigned long nr_pages);
extern bool is_memblock_offlined(struct memory_block *mem);
extern int sparse_add_section(int nid, unsigned long pfn,
- unsigned long nr_pages, struct vmem_altmap *altmap);
+ unsigned long nr_pages, struct vmem_altmap *altmap,
+ struct dev_pagemap *pgmap);
extern void sparse_remove_section(struct mem_section *ms,
unsigned long pfn, unsigned long nr_pages,
unsigned long map_offset, struct vmem_altmap *altmap);
@@ -348,4 +351,13 @@ void arch_remove_linear_mapping(u64 start, u64 size);
extern bool mhp_supports_memmap_on_memory(unsigned long size);
#endif /* CONFIG_MEMORY_HOTPLUG */
+#ifdef CONFIG_MHP_MEMMAP_ON_MEMORY
+bool mhp_memmap_on_memory(void);
+#else
+static inline bool mhp_memmap_on_memory(void)
+{
+ return false;
+}
+#endif
+
#endif /* __LINUX_MEMORY_HOTPLUG_H */