]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Make sure the linear mapping does not use the kernel mapping
authorAlexandre Ghiti <alex@ghiti.fr>
Tue, 29 Jun 2021 09:13:47 +0000 (11:13 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 23 Jul 2021 03:48:04 +0000 (20:48 -0700)
commitf8f1862c0d2b0483ba0d31d901b5b44fc28cf8ca
treed46bc59f44a7d801862c553f8364325a9da4224a
parent0098e427be3137a3216597e188be113140a21413
riscv: Make sure the linear mapping does not use the kernel mapping

For 64-bit kernel, the end of the address space is occupied by the
kernel mapping and currently, the functions to populate the kernel page
tables (i.e. create_p*d_mapping) do not override existing mapping so we
must make sure the linear mapping does not map memory in the kernel mapping
by clipping the memory above the memory limit.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Fixes: 51345dbe698d ("riscv: Add mem kernel parameter support")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/init.c