diff options
| author | Zong Li <[email protected]> | 2020-04-21 07:30:01 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2020-05-18 18:38:16 +0000 |
| commit | 0ff7c3b331276f584bde3ae9a16bacd8fa3d01e6 (patch) | |
| tree | 24a3643591160902f453747ebc0d8f457ad86673 /arch/powerpc/lib/code-patching.c | |
| parent | riscv: Use NOKPROBE_SYMBOL() instead of __krpobes annotation (diff) | |
| download | kernel-0ff7c3b331276f584bde3ae9a16bacd8fa3d01e6.tar.gz kernel-0ff7c3b331276f584bde3ae9a16bacd8fa3d01e6.zip | |
riscv: Use text_mutex instead of patch_lock
We don't need the additional lock protection when patching the text.
There are two patching interfaces here:
- patch_text: patch code and always synchronize with stop_machine()
- patch_text_nosync: patch code without synchronization, it's caller's
responsibility to synchronize all CPUs if needed.
For the first one, stop_machine() is protected by its own mutex, and
also the irq is already disabled here.
For the second one, in risc-v real case now, it would be used to ftrace
patching the mcount function, since it already running under
kstop_machine(), no other thread will run, so we could use text_mutex
on ftrace side.
Signed-off-by: Zong Li <[email protected]>
Reviewed-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
