• R
    arm64: Add memory hotplug support · a7a4dd0b
    Robin Murphy 提交于
    mainline inclusion
    from mainline-5.0-rc1
    commit 4ab215061554ae2a4b78744a5dd3b3c6639f16a7
    category: feature
    bugzilla: NA
    CVE: NA
    
    --------------------------------
    
    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: NRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    Signed-off-by: NJing xiangfeng <jingxiangfeng@huawei.com>
    Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    a7a4dd0b
numa.c 11.1 KB