]> git.baikalelectronics.ru Git - 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)
commit144c621b0481d7b31887e24b50cfd29d81e84ad5
tree1882235d135680c61cabf4a8bcc56fd6d640aac8
parent3d9216fd9d7a995389a6f12468f3d39375289155
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