diff mbox

ARM64:ftrace: fix ftrace_modify_graph_caller for branch replace

Message ID b86ab19fb587cc7acc94a9b990afe0c33a073170.1423755113.git.panand@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pratyush Anand Feb. 12, 2015, 3:33 p.m. UTC
ftrace_enable_ftrace_graph_caller and ftrace_disable_ftrace_graph_caller
should replace B(jmp) instruction and not BL(call) instruction.

patch 9f1ae7596aad71d18c3e88a3927f3f76b037b8fe 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(-)

Comments

Sergei Shtylyov Feb. 12, 2015, 7:51 p.m. UTC | #1
Hello.

On 02/12/2015 06:33 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.

> patch 9f1ae7596aad71d18c3e88a3927f3f76b037b8fe did a typo and used

    s/patch/commit/. And please specify that commit's summary line in parens.

> AARCH64_INSN_BRANCH_LINK instead of AARCH64_INSN_BRANCH_NOLINK.

> Signed-off-by: Pratyush Anand <panand@redhat.com>

[...]

WBR, Sergei
Pratyush Anand Feb. 13, 2015, 4:08 a.m. UTC | #2
On Friday 13 February 2015 01:21 AM, Sergei Shtylyov wrote:
> Hello.
>
> On 02/12/2015 06:33 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.
>
>> patch 9f1ae7596aad71d18c3e88a3927f3f76b037b8fe did a typo and used
>
>     s/patch/commit/. And please specify that commit's summary line in
> parens.

Thanks for review, resend it with modified log.

~Pratyush

>
>> AARCH64_INSN_BRANCH_LINK instead of AARCH64_INSN_BRANCH_NOLINK.
>
>> Signed-off-by: Pratyush Anand <panand@redhat.com>
>
> [...]
>
> WBR, Sergei
>
diff mbox

Patch

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)