mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: yuanjunqing <yuanjunqing66@163.com>
To: "Maciej W. Rozycki" <macro@wdc.com>, WANG Xuerui <kernel@xen0n.name>
Cc: tsbogend@alpha.franken.de, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org, liulichao@loongson.cn,
	"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH] function:stacktrace/mips: Fix function:stacktrace for mips
Date: Thu, 4 Jun 2020 11:25:09 +0800	[thread overview]
Message-ID: <810cf1b6-ce59-7570-1a5e-4fac8992a99d@163.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2006040212460.9519@redsun52.ssa.fujisawa.hgst.com>


在 2020/6/4 上午9:17, Maciej W. Rozycki 写道:
> On Fri, 29 May 2020, WANG Xuerui wrote:
>
>> On 2020/5/29 17:29, yuanjunqing wrote:
>>
>>>> diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
>>>> index cff52b283e03..cd5545764e5f 100644
>>>> --- a/arch/mips/kernel/mcount.S
>>>> +++ b/arch/mips/kernel/mcount.S
>>>> @@ -87,8 +87,15 @@ EXPORT_SYMBOL(_mcount)
>>>>   	PTR_LA   t1, _etext
>>>>   	sltu     t3, t1, a0	/* t3 = (a0 > _etext) */
>>>>   	or       t1, t2, t3
>>>> +	PTR_LA	 t2, stlab-4 	/* t2: "function:stacktrace" return address */
>>>> +	move	 a1, AT		/* arg2: parent's return address */
>>>>   	beqz     t1, ftrace_call
>>>> -	 nop
>>>> +	 nop			/* "function:stacktrace" return address */
>>>> +stlab:
>>>> +	PTR_LA	t2, stlab-4
>>>> +	/* ftrace_call_end: ftrace_call return address */
>>>> +	beq	t2,ra, ftrace_call_end
>>>> +	nop
>  Broken delay slot indentation.

Thank you for your reply. For this question that you mentioned about the delay slot, I will modify my patch again.

>
>>>>   #if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
>>>>   	PTR_SUBU a0, a0, 16	/* arg1: adjust to module's recorded callsite */
>>>>   #else
>>>> @@ -98,7 +105,9 @@ EXPORT_SYMBOL(_mcount)
>>>>   	.globl ftrace_call
>>>>   ftrace_call:
>>>>   	nop	/* a placeholder for the call to a real tracing function */
>>>> -	 move	a1, AT		/* arg2: parent's return address */
>>>> +	move	ra, t2		/* t2: "function:stacktrace" return address */
>  Likewise.  NB I haven't investigated if the change makes sense.  A more 
> detailed explanation in the change description is certainly needed.

I will attach a specific description for further explanation about the second patch later.

>
>   Maciej


      reply	other threads:[~2020-06-04  3:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 12:36 YuanJunQing
2020-05-29  9:29 ` yuanjunqing
2020-05-29  9:41   ` WANG Xuerui
2020-06-04  1:17     ` Maciej W. Rozycki
2020-06-04  3:25       ` yuanjunqing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=810cf1b6-ce59-7570-1a5e-4fac8992a99d@163.com \
    --to=yuanjunqing66@163.com \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=liulichao@loongson.cn \
    --cc=macro@linux-mips.org \
    --cc=macro@wdc.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®