Re: [PATCH v2 4/5] LoongArch: ftrace: Add direct call trampoline samples support

From: Steven Rostedt
Date: Tue May 23 2023 - 10:34:51 EST


On Thu, 27 Apr 2023 10:12:31 +0800
Youling Tang <tangyouling@xxxxxxxxxxx> wrote:

> The ftrace samples need per-architecture trampoline implementations
> to save and restore argument registers around the calls to
> my_direct_func* and to restore polluted registers (eg: ra).
>
> Signed-off-by: Qing Zhang <zhangqing@xxxxxxxxxxx>
> Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx>
> ---
> arch/loongarch/Kconfig | 2 +
> samples/ftrace/ftrace-direct-modify.c | 34 +++++++++++++++++
> samples/ftrace/ftrace-direct-multi-modify.c | 41 +++++++++++++++++++++
> samples/ftrace/ftrace-direct-multi.c | 25 +++++++++++++
> samples/ftrace/ftrace-direct-too.c | 27 ++++++++++++++
> samples/ftrace/ftrace-direct.c | 23 ++++++++++++
> 6 files changed, 152 insertions(+)

Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve