Re: [PATCH v16 04/18] function_graph: Replace fgraph_ret_regs with ftrace_regs

Heiko Carstens
2024-10-16T08:34:15Z

On Wed, Oct 16, 2024 at 08:47:20AM +0900, Masami Hiramatsu wrote:
> On Tue, 15 Oct 2024 20:39:06 +0200
> Heiko Carstens <hca@linux.ibm.com> wrote:
>
> > That would make things much simpler... e.g. your new patch is also
> > writing r3 to fregs, why?
>
> BTW, according to the document [1], r3 is for "return value 1", isn't it
> used usually?
>
> [1] https://www.kernel.org/doc/Documentation/s390/Debugging390.txt

That is true for the 32 bit ABI, but not for the 64 bit ABI which we
care about. Besides other this is also the reason why I removed the
above file five years ago: f62f7dcbf023 ("Documentation/s390: remove
outdated debugging390 documentation").

If you really want to understand the 64 bit s390 ABI then you need to
look at https://github.com/IBM/s390x-abi .

A PDF file of the latest release is available at
https://github.com/IBM/s390x-abi/releases/download/v1.6.1/lzsabi_s390x.pdf

See section "1.2.5. Return Values" for return value handling.

All of that said, I would appreciate if you would just merge the
provided patch, unless there is a reason for not doing that. Chances
are that I missed something with all the recent fregs vs ptregs
changes.