• Huacai Chen's avatar
    LoongArch: numa: Fix high_memory calculation · 1943feec
    Huacai Chen authored
    For 64bit kernel without HIGHMEM, high_memory is the virtual address of
    the highest physical address in the system. But __va(get_num_physpages()
    << PAGE_SHIFT) is not what we want for high_memory because there may be
    holes in the physical address space. On the other hand, max_low_pfn is
    calculated from memblock_end_of_DRAM(), which is exactly corresponding
    to the highest physical address, so use it for high_memory calculation.
    
    Cc: <stable@vger.kernel.org>
    Fixes: d4b6f156 ("LoongArch: Add Non-Uniform Memory Access (NUMA) support")
    Signed-off-by: default avatarChong Qiao <qiaochong@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    1943feec
numa.c 10.5 KB