]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Add memory hotplug support
authorRobin Murphy <robin.murphy@arm.com>
Tue, 11 Dec 2018 18:48:48 +0000 (18:48 +0000)
committerWill Deacon <will.deacon@arm.com>
Wed, 12 Dec 2018 14:43:43 +0000 (14:43 +0000)
commit0c763c2b14a94129e7cf614247a4ee7f6631d4ff
tree47b51d9c71d7c0012c043a7f161c30e9b08fa80a
parent11d90236387aaa095bd7e1995d82c3000cecd255
arm64: Add memory hotplug support

Wire up the basic support for hot-adding memory. Since memory hotplug
is fairly tightly coupled to sparsemem, we tweak pfn_valid() to also
cross-check the presence of a section in the manner of the generic
implementation, before falling back to memblock to check for no-map
regions within a present section as before. By having arch_add_memory(()
create the linear mapping first, this then makes everything work in the
way that __add_section() expects.

We expect hotplug to be ACPI-driven, so the swapper_pg_dir updates
should be safe from races by virtue of the global device hotplug lock.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/Kconfig
arch/arm64/mm/init.c
arch/arm64/mm/mmu.c
arch/arm64/mm/numa.c