diff options
author | 2023-06-29 20:58:44 +0800 | |
---|---|---|
committer | 2023-06-29 20:58:44 +0800 | |
commit | 6e320363339b585a36bf40d74592db3db021e017 (patch) | |
tree | fb62b5307b7580861fd4fa037dc3fb6961086a57 /arch/loongarch/include | |
parent | LoongArch: Add larch_insn_gen_break() to generate break insns (diff) | |
download | linux-6e320363339b585a36bf40d74592db3db021e017.tar.gz linux-6e320363339b585a36bf40d74592db3db021e017.tar.bz2 linux-6e320363339b585a36bf40d74592db3db021e017.zip |
LoongArch: Use larch_insn_gen_break() for kprobes
For now, we can use larch_insn_gen_break() to define KPROBE_BP_INSN and
KPROBE_SSTEPBP_INSN. Because larch_insn_gen_break() returns instruction
word, define kprobe_opcode_t as u32, then do some small changes related
with type conversion, no functional change intended.
Tested-by: Jeff Xie <xiehuan09@gmail.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r-- | arch/loongarch/include/asm/kprobes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/kprobes.h b/arch/loongarch/include/asm/kprobes.h index 7b9fc3ed71c3..60fa753a010d 100644 --- a/arch/loongarch/include/asm/kprobes.h +++ b/arch/loongarch/include/asm/kprobes.h @@ -22,7 +22,7 @@ do { \ #define kretprobe_blacklist_size 0 -typedef union loongarch_instruction kprobe_opcode_t; +typedef u32 kprobe_opcode_t; /* Architecture specific copy of original instruction */ struct arch_specific_insn { |