summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-04-20 12:04:26 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-04-20 12:04:26 -0400
commitcfec36d75b460843403c9e1392fddedf08288c9f (patch)
treec2680c2627772aead51327fb3b21bf06ee66f72a /arch/powerpc/lib/code-patching.c
parent3b7c824e9330a640312fce1b04537c684c1d602c (diff)
parentb22a1fa1b34f17ef3a5cc6007e0705375de3d5dd (diff)
Merge remote-tracking branch 'linux-stable/linux-4.15.y' into bcachefs-buffered-io-2
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
-rw-r--r--arch/powerpc/lib/code-patching.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index d469224c4ada..096d4e4d31e6 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -302,6 +302,11 @@ int instr_is_relative_branch(unsigned int instr)
return instr_is_branch_iform(instr) || instr_is_branch_bform(instr);
}
+int instr_is_relative_link_branch(unsigned int instr)
+{
+ return instr_is_relative_branch(instr) && (instr & BRANCH_SET_LINK);
+}
+
static unsigned long branch_iform_target(const unsigned int *instr)
{
signed long imm;