]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
arm64/numa: Report correct memblock range for the dummy node
authorAnshuman Khandual <anshuman.khandual@arm.com>
Sat, 22 Sep 2018 15:39:55 +0000 (21:09 +0530)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
BugLink: https://bugs.launchpad.net/bugs/1854216
[ Upstream commit 77cfe950901e5c13aca2df6437a05f39dd9a929b ]

The dummy node ID is marked into all memory ranges on the system. So the
dummy node really extends the entire memblock.memory. Hence report correct
extent information for the dummy node using memblock range helper functions
instead of the range [0LLU, PFN_PHYS(max_pfn) - 1)].

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/mm/numa.c

index dad128ba98bf8d827a1f7cc750f41c543a8f92f8..e9c843e0c1727e1bb1d964fb0d5a348d22053f0f 100644 (file)
@@ -419,7 +419,7 @@ static int __init dummy_numa_init(void)
        if (numa_off)
                pr_info("NUMA disabled\n"); /* Forced off on command line. */
        pr_info("Faking a node at [mem %#018Lx-%#018Lx]\n",
-               0LLU, PFN_PHYS(max_pfn) - 1);
+               memblock_start_of_DRAM(), memblock_end_of_DRAM() - 1);
 
        for_each_memblock(memory, mblk) {
                ret = numa_add_memblk(0, mblk->base, mblk->base + mblk->size);