]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: No need to relocate the dtb as it lies in the fixmap region
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Fri, 28 Apr 2023 10:37:45 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Apr 2023 23:29:23 +0000 (08:29 +0900)
commitb38092f3d343470057f9c8eb51ecadae557db376
tree4030fe3145ad8c1ca237fb87480e0c19e1c33cba
parent7c1c28d15e9944182f4de2be865c4a2f6a769a8c
riscv: No need to relocate the dtb as it lies in the fixmap region

commit 1b50f956c8fe9082bdee4a9cfd798149c52f7043 upstream.

We used to access the dtb via its linear mapping address but now that the
dtb early mapping was moved in the fixmap region, we can keep using this
address since it is present in swapper_pg_dir, and remove the dtb
relocation.

Note that the relocation was wrong anyway since early_memremap() is
restricted to 256K whereas the maximum fdt size is 2MB.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230329081932.79831-4-alexghiti@rivosinc.com
Cc: stable@vger.kernel.org # 6.2.x
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/mm/init.c