]> git.baikalelectronics.ru Git - kernel.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)
commite41ebf6d3e171c3786ae09bf0aad9a56df449b3c
treed0e002986e4908a0a7fea38cb27d835800ea88b1
parent9aa2a6496376dd14fa22c28c9c0aaab4bbc4e881
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