riscv: drop the use of XIP_OFFSET in create_kernel_page_table()
authorNam Cao <namcao@linutronix.de>
Fri, 7 Jun 2024 20:22:12 +0000 (22:22 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 12 Sep 2024 14:23:01 +0000 (07:23 -0700)
commita7cfb999433ad3a1aa7ca86ecdaf3e061ab7076a
tree708552ab1b53b18710e0ae1bed5fc9072c88abe2
parent75fdf791dff08470c035996f5d3e92c64491ce19
riscv: drop the use of XIP_OFFSET in create_kernel_page_table()

XIP_OFFSET is the hard-coded offset of writable data section within the
kernel.

By hard-coding this value, the read-only section of the kernel (which is
placed before the writable data section) is restricted in size.

As a preparation to remove this hard-coded value entirely, stop using
XIP_OFFSET in create_kernel_page_table(). Instead use _sdata and _start to
do the same thing.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/4ea3f222a7eb9f91c04b155ff2e4d3ef19158acc.1717789719.git.namcao@linutronix.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c