]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
MIPS: Loongson3,SGI-IP27: Simplify max_low_pfn calculation
authorPaul Burton <paul.burton@mips.com>
Mon, 12 Nov 2018 22:18:01 +0000 (22:18 +0000)
committerPaul Burton <paul.burton@mips.com>
Thu, 15 Nov 2018 23:42:15 +0000 (15:42 -0800)
commit1229ace4a4a2e2c982a32fb075dc1bf95423924f
treed0e002986e4908a0a7fea38cb27d835800ea88b1
parent25517ed4e99b3be4244dfd61d1e5c753b09faf2c
MIPS: Loongson3,SGI-IP27: Simplify max_low_pfn calculation

Both the Loongson3 & SGI-IP27 platforms set max_low_pfn to the last
available PFN describing memory. They both do it in paging_init() which
is later than ideal since max_low_pfn is used before that function is
called. Simplify both platforms to trivially initialize max_low_pfn
using the end address of DRAM, and do it earlier in prom_meminit().

Signed-off-by: Paul Burton <paul.burton@mips.com>
Suggested-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Patchwork: https://patchwork.linux-mips.org/patch/21104/
References: https://patchwork.linux-mips.org/patch/21031/
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: linux-mips@linux-mips.org
arch/mips/loongson64/loongson-3/numa.c
arch/mips/sgi-ip27/ip27-memory.c