]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
powerpc/mm: factor out creating/removing linear mapping
authorDavid Hildenbrand <david@redhat.com>
Wed, 11 Nov 2020 14:53:17 +0000 (15:53 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 05:56:58 +0000 (16:56 +1100)
commit4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42
tree1882235d135680c61cabf4a8bcc56fd6d640aac8
parentd6718941a2767fb383e105d257d2105fe4f15f0e
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
arch/powerpc/mm/mem.c
include/linux/memory_hotplug.h