]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ftrace: fix ftrace_modify_graph_caller for branch replace
authorPratyush Anand <panand@redhat.com>
Fri, 13 Feb 2015 04:06:21 +0000 (04:06 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 23 Feb 2015 09:13:45 +0000 (09:13 +0000)
commitc8aae33a0ca3a6cc55287ae58e51c6e74f0b75f7
tree051bcd54364207bcfe982963f13da787441fbf67
parentb7d65746744b343701de14ca433982a3229390be
arm64: ftrace: fix ftrace_modify_graph_caller for branch replace

ftrace_enable_ftrace_graph_caller and ftrace_disable_ftrace_graph_caller
should replace B(jmp) instruction and not BL(call) instruction.

Commit f044381f3131("arm64: Correct ftrace calls to
aarch64_insn_gen_branch_imm()") had a typo and used
AARCH64_INSN_BRANCH_LINK instead of AARCH64_INSN_BRANCH_NOLINK.

Either instruction will work, as the link register is saved/restored
across the branch but this better matches the intention of the code.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/ftrace.c