aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorSamuel Holland <[email protected]>2022-11-26 00:09:19 -0600
committerPalmer Dabbelt <[email protected]>2022-12-08 17:22:53 -0800
commit0c49688174f5347c3f8012e84c0ffa0d2b2890c8 (patch)
treeb64ab8c2728beefcc0de81793c1ce9ea8aea37fc /lib/mpi/mpi-mod.c
parent9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff)
riscv: Fix crash during early errata patching
The patch function for the T-Head PBMT errata calls __pa_symbol() before relocation. This crashes when CONFIG_DEBUG_VIRTUAL is enabled, because __pa_symbol() forwards to __phys_addr_symbol(), and __phys_addr_symbol() checks against the absolute kernel start/end address. Fix this by checking against the kernel map instead of a symbol address. Fixes: a35707c3d850 ("riscv: add memory-type errata for T-Head") Reviewed-by: Heiko Stuebner <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions