summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2020-11-11 15:53:17 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-11-19 16:56:58 +1100
commit4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42 (patch)
tree1882235d135680c61cabf4a8bcc56fd6d640aac8 /include
parentd6718941a2767fb383e105d257d2105fe4f15f0e (diff)
downloadlinux-stable-4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42.tar.gz
linux-stable-4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42.tar.bz2
linux-stable-4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42.zip
powerpc/mm: factor out creating/removing linear mapping
We want to stop abusing memory hotplug infrastructure in memtrace code to perform allocations and remove the linear mapping. Instead we will use alloc_contig_pages() and remove the linear mapping manually. Let's factor out creating/removing the linear mapping into arch_create_linear_mapping() / arch_remove_linear_mapping() - so in the future, we might be able to have whole arch_add_memory() / arch_remove_memory() be implemented in common code. Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201111145322.15793-4-david@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/memory_hotplug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index d65c6fdc5cfc..00b9e9bd3850 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -375,6 +375,9 @@ extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
unsigned long pnum);
extern struct zone *zone_for_pfn_range(int online_type, int nid, unsigned start_pfn,
unsigned long nr_pages);
+extern int arch_create_linear_mapping(int nid, u64 start, u64 size,
+ struct mhp_params *params);
+void arch_remove_linear_mapping(u64 start, u64 size);
#endif /* CONFIG_MEMORY_HOTPLUG */
#endif /* __LINUX_MEMORY_HOTPLUG_H */