linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH Resend] ARM64:ftrace: fix ftrace_modify_graph_caller for branch replace
Date: Tue, 17 Feb 2015 09:12:19 +0900	[thread overview]
Message-ID: <54E28763.5080708@linaro.org> (raw)
In-Reply-To: <ce66ac4d80d4b200a9dad610d46533bb24934352.1423800192.git.panand@redhat.com>

On 02/13/2015 01:06 PM, Pratyush Anand wrote:
> ftrace_enable_ftrace_graph_caller and ftrace_disable_ftrace_graph_caller
> should replace B(jmp) instruction and not BL(call) instruction.

Thanks. I originally intended to use "b".
("bl" may also work anyway 'cause link register will be saved/restored
around ftrace_caller().)

-Takahiro AKASHI

> commit 9f1ae7596aad("arm64: Correct ftrace calls to
> aarch64_insn_gen_branch_imm()") did a typo and used
> AARCH64_INSN_BRANCH_LINK instead of AARCH64_INSN_BRANCH_NOLINK.
>
> Signed-off-by: Pratyush Anand <panand@redhat.com>
> ---
>   arch/arm64/kernel/ftrace.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c
> index cf8556ae09d0..c851be795080 100644
> --- a/arch/arm64/kernel/ftrace.c
> +++ b/arch/arm64/kernel/ftrace.c
> @@ -156,7 +156,7 @@ static int ftrace_modify_graph_caller(bool enable)
>
>   	branch = aarch64_insn_gen_branch_imm(pc,
>   					     (unsigned long)ftrace_graph_caller,
> -					     AARCH64_INSN_BRANCH_LINK);
> +					     AARCH64_INSN_BRANCH_NOLINK);
>   	nop = aarch64_insn_gen_nop();
>
>   	if (enable)
>

      reply	other threads:[~2015-02-17  0:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  4:06 [PATCH Resend] ARM64:ftrace: fix ftrace_modify_graph_caller for branch replace Pratyush Anand
2015-02-17  0:12 ` AKASHI Takahiro [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=54E28763.5080708@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).