summaryrefslogtreecommitdiff
path: root/arch/loongarch/kernel/jump_label.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/kernel/jump_label.c')
-rw-r--r--arch/loongarch/kernel/jump_label.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/loongarch/kernel/jump_label.c b/arch/loongarch/kernel/jump_label.c
index 31891214b767..24a3f4d8540c 100644
--- a/arch/loongarch/kernel/jump_label.c
+++ b/arch/loongarch/kernel/jump_label.c
@@ -6,9 +6,10 @@
*/
#include <linux/kernel.h>
#include <linux/jump_label.h>
+#include <asm/cacheflush.h>
#include <asm/inst.h>
-void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type)
+bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type)
{
u32 insn;
void *addr = (void *)jump_entry_code(entry);
@@ -18,5 +19,12 @@ void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type ty
else
insn = larch_insn_gen_nop();
- larch_insn_patch_text(addr, insn);
+ larch_insn_write(addr, insn);
+
+ return true;
+}
+
+void arch_jump_label_transform_apply(void)
+{
+ flush_icache_all();
}