riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE
authorAlexandre Ghiti <alex@ghiti.fr>
Tue, 29 Jun 2021 09:13:48 +0000 (11:13 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 23 Jul 2021 04:34:36 +0000 (21:34 -0700)
commitdb6b84a368b495cb7e41be9cb9e73d4d0537d027
treeeba21fdeb9b9b8238fb0cb08ef76226f5eec7e74
parentc99127c452484ac89c75af39c3c865174ce2de99
riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE

The check that is done in setup_bootmem currently only works for 32-bit
kernel since the kernel mapping has been moved outside of the linear
mapping for 64-bit kernel. So make sure that for 64-bit kernel, the kernel
mapping does not overlap with the last 4K of the addressable memory.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/init.c