diff options
author | Robin Murphy <robin.murphy@arm.com> | 2018-12-11 18:48:48 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-12-12 14:43:43 +0000 |
commit | 4ab215061554ae2a4b78744a5dd3b3c6639f16a7 (patch) | |
tree | 47b51d9c71d7c0012c043a7f161c30e9b08fa80a /arch/arm64/mm/numa.c | |
parent | 6e4ede698d1c17102e42c6f734f7d8cf60df28d5 (diff) | |
download | linux-4ab215061554ae2a4b78744a5dd3b3c6639f16a7.tar.gz linux-4ab215061554ae2a4b78744a5dd3b3c6639f16a7.tar.bz2 linux-4ab215061554ae2a4b78744a5dd3b3c6639f16a7.zip |
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>
Diffstat (limited to 'arch/arm64/mm/numa.c')
-rw-r--r-- | arch/arm64/mm/numa.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index 27a31efd9e8e..ae34e3a1cef1 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -466,3 +466,13 @@ void __init arm64_numa_init(void) numa_init(dummy_numa_init); } + +/* + * We hope that we will be hotplugging memory on nodes we already know about, + * such that acpi_get_node() succeeds and we never fall back to this... + */ +int memory_add_physaddr_to_nid(u64 addr) +{ + pr_warn("Unknown node for memory at 0x%llx, assuming node 0\n", addr); + return 0; +} |