aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/jump_label.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-10-20 11:26:33 -0700
committerKevin Hilman <khilman@linaro.org>2015-10-20 11:26:33 -0700
commit09147a74376428080eddfed0cbce2cab205c2508 (patch)
tree7c903b82831eb03498dfc89c615e2acd5e1d9d6f /arch/arm64/kernel/jump_label.c
parente4bec9707eb7446e0cd1961f91e6948819327933 (diff)
parentc2fab09b2ec32f252029757ba3353ea3d308c811 (diff)
Merge branch 'test/linux-linaro-lsk-v3.18-android' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-v3.18-androidlsk-v3.18-15.10-android
Diffstat (limited to 'arch/arm64/kernel/jump_label.c')
-rw-r--r--arch/arm64/kernel/jump_label.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm64/kernel/jump_label.c b/arch/arm64/kernel/jump_label.c
index 263a166291fb..4f1fec7a46db 100644
--- a/arch/arm64/kernel/jump_label.c
+++ b/arch/arm64/kernel/jump_label.c
@@ -22,9 +22,8 @@
#ifdef HAVE_JUMP_LABEL
-static void __arch_jump_label_transform(struct jump_entry *entry,
- enum jump_label_type type,
- bool is_static)
+void arch_jump_label_transform(struct jump_entry *entry,
+ enum jump_label_type type)
{
void *addr = (void *)entry->code;
u32 insn;
@@ -37,22 +36,18 @@ static void __arch_jump_label_transform(struct jump_entry *entry,
insn = aarch64_insn_gen_nop();
}
- if (is_static)
- aarch64_insn_patch_text_nosync(addr, insn);
- else
- aarch64_insn_patch_text(&addr, &insn, 1);
-}
-
-void arch_jump_label_transform(struct jump_entry *entry,
- enum jump_label_type type)
-{
- __arch_jump_label_transform(entry, type, false);
+ aarch64_insn_patch_text(&addr, &insn, 1);
}
void arch_jump_label_transform_static(struct jump_entry *entry,
enum jump_label_type type)
{
- __arch_jump_label_transform(entry, type, true);
+ /*
+ * We use the architected A64 NOP in arch_static_branch, so there's no
+ * need to patch an identical A64 NOP over the top of it here. The core
+ * will call arch_jump_label_transform from a module notifier if the
+ * NOP needs to be replaced by a branch.
+ */
}
#endif /* HAVE_JUMP_LABEL */