riscv: Fixup pfn_valid error with wrong max_mapnr
authorGuo Ren <guoren@linux.alibaba.com>
Thu, 21 Jan 2021 06:31:17 +0000 (14:31 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 23 Jan 2021 04:18:03 +0000 (20:18 -0800)
commit336e8eb2a3cfe2285c314cd85630076da365f6c6
treeb02a9adf62c5efe99b9f61edd05d9b4b52326750
parent19c329f6808995b142b3966301f217c831e7cf31
riscv: Fixup pfn_valid error with wrong max_mapnr

The max_mapnr is the number of PFNs, not absolute PFN offset.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Fixes: d0d8aae64566 ("RISC-V: Set maximum number of mapped pages correctly")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/init.c