diff options
author | Alexandre Ghiti <[email protected]> | 2024-05-23 13:51:34 +0200 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2024-05-23 08:22:17 -0700 |
commit | 6ca445d8af0ed5950ebf899415fd6bfcd7d9d7a3 (patch) | |
tree | 0927a03832641e507c08fbec6ed867cae878fc1c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 46cad6cd9b10ab14acf20e0779998f88c6e44c4f (diff) |
riscv: Fix early ftrace nop patching
Commit c97bf629963e ("riscv: Fix text patching when IPI are used")
converted ftrace_make_nop() to use patch_insn_write() which does not
emit any icache flush relying entirely on __ftrace_modify_code() to do
that.
But we missed that ftrace_make_nop() was called very early directly when
converting mcount calls into nops (actually on riscv it converts 2B nops
emitted by the compiler into 4B nops).
This caused crashes on multiple HW as reported by Conor and Björn since
the booting core could have half-patched instructions in its icache
which would trigger an illegal instruction trap: fix this by emitting a
local flush icache when early patching nops.
Fixes: c97bf629963e ("riscv: Fix text patching when IPI are used")
Signed-off-by: Alexandre Ghiti <[email protected]>
Reported-by: Conor Dooley <[email protected]>
Tested-by: Conor Dooley <[email protected]>
Reviewed-by: Björn Töpel <[email protected]>
Tested-by: Björn Töpel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions