linux-stable/arch/loongarch
Huacai Chen 490f3b805e LoongArch: numa: Fix high_memory calculation
commit 1943feecf8 upstream.

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: d4b6f1562a ("LoongArch: Add Non-Uniform Memory Access (NUMA) support")
Signed-off-by: Chong Qiao <qiaochong@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-06 14:57:01 +02:00
..
boot loongarch: efi: enable generic EFI compressed boot 2022-09-20 09:50:31 +02:00
configs LoongArch: Update Loongson-3 default config file 2022-10-12 16:36:23 +08:00
include LoongArch: Define relocation types for ABI v2.10 2023-10-06 14:57:01 +02:00
kernel LoongArch: numa: Fix high_memory calculation 2023-10-06 14:57:01 +02:00
lib LoongArch: Improve dump_tlb() output messages 2022-09-03 18:01:27 +08:00
mm mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
net LoongArch: BPF: Fix check condition to call lu32id in move_imm() 2023-08-03 10:24:15 +02:00
pci LoongArch: Use TLB for ioremap() 2022-10-12 16:36:14 +08:00
vdso LoongArch: Fix build warnings in VDSO 2022-08-25 19:34:59 +08:00
Kbuild LoongArch: Add BPF JIT support 2022-10-12 16:36:20 +08:00
Kconfig Revert "loongarch/cpu: Switch to arch_cpu_finalize_init()" 2023-08-16 18:27:20 +02:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile LoongArch: Makefile: Use "grep -E" instead of "egrep" 2022-11-21 19:02:57 +08:00