[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mhng-29a592bf-1b25-4c6c-8f37-0d05d39bc093@palmer-ri-x1c9a>
Date: Sun, 25 Jun 2023 13:32:32 -0700 (PDT)
From: Palmer Dabbelt <palmer@...belt.com>
To: suagrfillet@...il.com
CC: rostedt@...dmis.org, Paul Walmsley <paul.walmsley@...ive.com>,
aou@...s.berkeley.edu, mhiramat@...nel.org,
Mark Rutland <mark.rutland@....com>, guoren@...nel.org,
jszhang@...nel.org, e.shatokhin@...ro.com,
Bjorn Topel <bjorn@...osinc.com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH V10 4/4] samples: ftrace: Add riscv support for SAMPLE_FTRACE_DIRECT[_MULTI]
On Tue, 16 May 2023 02:37:53 PDT (-0700), suagrfillet@...il.com wrote:
> Steven Rostedt <rostedt@...dmis.org> 于2023年5月15日周一 18:37写道:
>>
>> On Thu, 11 May 2023 17:32:34 +0800
>> Song Shuai <suagrfillet@...il.com> wrote:
>>
>> > select HAVE_SAMPLE_FTRACE_DIRECT and HAVE_SAMPLE_FTRACE_DIRECT_MULTI
>> > for ARCH_RV64I in arch/riscv/Kconfig. And add riscv asm code for
>> > the ftrace-direct*.c files in samples/ftrace/.
>> >
>> > Link: https://lore.kernel.org/linux-riscv/c68bac83-5c88-80b1-bac9-e1fd4ea8f07e@yadro.com/T/#ma13012560331c66b051b580b3ab4a04ba44455ec
>> > Tested-by: Evgenii Shatokhin <e.shatokhin@...ro.com>
>> > Signed-off-by: Song Shuai <suagrfillet@...il.com>
>> > Tested-by: Guo Ren <guoren@...nel.org>
>> > Signed-off-by: Guo Ren <guoren@...nel.org>
>> > Acked-by: Björn Töpel <bjorn@...osinc.com>
>> > ---
>> > arch/riscv/Kconfig | 2 ++
>> > samples/ftrace/ftrace-direct-modify.c | 34 ++++++++++++++++++
>> > samples/ftrace/ftrace-direct-multi-modify.c | 40 +++++++++++++++++++++
>> > samples/ftrace/ftrace-direct-multi.c | 24 +++++++++++++
>> > samples/ftrace/ftrace-direct-too.c | 27 ++++++++++++++
>> > samples/ftrace/ftrace-direct.c | 23 ++++++++++++
>> > 6 files changed, 150 insertions(+)
>>
>> I acked v8 (which you will need my ack to get these in). Unless this patch
>> changed since v8, you should include my ack in further versions.
>>
> There were no changes in this patch, except for a few tab pretties since v8.
> your Acked-by will still be included.
>> Or you may be waiting longer for its acceptance.
>>
>> If the patch did change, please acknowledge that in the next version (or
>> this one if it did change), asking me to ack it again.
The samples fail to build on rv32, they're rv64-specific. I think
something like this should do it
diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c
index 5c319db48af2..3707c447a42d 100644
--- a/samples/ftrace/ftrace-direct-too.c
+++ b/samples/ftrace/ftrace-direct-too.c
@@ -24,19 +24,19 @@ asm (
" .type my_tramp, @function\n"
" .globl my_tramp\n"
" my_tramp:\n"
-" addi sp,sp,-40\n"
-" sd a0,0(sp)\n"
-" sd a1,8(sp)\n"
-" sd a2,16(sp)\n"
-" sd t0,24(sp)\n"
-" sd ra,32(sp)\n"
+" addi sp,sp,-8*SZREG\n"
+" REG_S a0,0*SZREG(sp)\n"
+" REG_S a1,1*SZREG(sp)\n"
+" REG_S a2,2*SZREG(sp)\n"
+" REG_S t0,3*SZREG(sp)\n"
+" REG_S ra,4*SZREG(sp)\n"
" call my_direct_func\n"
-" ld a0,0(sp)\n"
-" ld a1,8(sp)\n"
-" ld a2,16(sp)\n"
-" ld t0,24(sp)\n"
-" ld ra,32(sp)\n"
-" addi sp,sp,40\n"
+" REG_L a0,0*SZREG(sp)\n"
+" REG_L a1,1*SZREG(sp)\n"
+" REG_L a2,2*SZREG(sp)\n"
+" REG_L t0,3*SZREG(sp)\n"
+" REG_L ra,4*SZREG(sp)\n"
+" addi sp,sp,8*SZREG\n"
" jr t0\n"
" .size my_tramp, .-my_tramp\n"
" .popsection\n"
probably for all of them. Do you mind sending a v11 with that fixed?
>>
>> -- Steve
>
>
>
> --
> Thanks,
> Song
Powered by blists - more mailing lists