diff options
author | Samuel Holland <samuel@sholland.org> | 2022-11-26 09:09:19 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-12-09 04:22:53 +0300 |
commit | 0c49688174f5347c3f8012e84c0ffa0d2b2890c8 (patch) | |
tree | b64ab8c2728beefcc0de81793c1ce9ea8aea37fc /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-0c49688174f5347c3f8012e84c0ffa0d2b2890c8.tar.xz |
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 <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20221126060920.65009-1-samuel@sholland.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions