diff options
| author | Chenghao Duan <duanchenghao@kylinos.cn> | 2025-12-31 15:19:20 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-12-31 15:19:20 +0800 |
| commit | 45cb47c628dfbd1994c619f3eac271a780602826 (patch) | |
| tree | c7adca4f090386b9e4c521d428bb4c4dbbb80e40 /tools/perf/scripts/python/git@git.tavy.me:linux-stable.git | |
| parent | 9bdc1ab5e4ce6f066119018d8f69631a46f9c5a0 (diff) | |
LoongArch: Refactor register restoration in ftrace_common_return
Refactor the register restoration sequence in the ftrace_common_return
function to clearly distinguish between the logic of normal returns and
direct call returns in function tracing scenarios. The logic is as
follows:
1. In the case of a normal return, the execution flow returns to the
traced function, and ftrace must ensure that the register data is
consistent with the state when the function was entered.
ra = parent return address; t0 = traced function return address.
2. In the case of a direct call return, the execution flow jumps to the
custom trampoline function, and ftrace must ensure that the register
data is consistent with the state when ftrace was entered.
ra = traced function return address; t0 = parent return address.
Cc: stable@vger.kernel.org
Fixes: 9cdc3b6a299c ("LoongArch: ftrace: Add direct call support")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/perf/scripts/python/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
