summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/kprobes.h
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-04-19 00:29:19 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-05-29 11:17:08 -0700
commit8c9f4940c27dd72ee68ca5af2922e4d83ca9121b (patch)
tree502c7a84b720d1a39c3e0c1c5a0b24514a55b2ce /arch/riscv/include/asm/kprobes.h
parent37a7a2a10ec525a79d733008bc7fe4ebbca34382 (diff)
riscv: kprobes: Remove redundant kprobe_step_ctx
Inspired by commit ba090f9cafd5 ("arm64: kprobes: Remove redundant kprobe_step_ctx"), the ss_pending and match_addr of kprobe_step_ctx are redundant because those can be replaced by KPROBE_HIT_SS and &cur_kprobe->ainsn.api.insn[0] + GET_INSN_LENGTH(cur->opcode) respectively. Remove the kprobe_step_ctx to simplify the code. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm/kprobes.h')
-rw-r--r--arch/riscv/include/asm/kprobes.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/riscv/include/asm/kprobes.h b/arch/riscv/include/asm/kprobes.h
index 4647d38018f6..9ea9b5ec3113 100644
--- a/arch/riscv/include/asm/kprobes.h
+++ b/arch/riscv/include/asm/kprobes.h
@@ -29,18 +29,11 @@ struct prev_kprobe {
unsigned int status;
};
-/* Single step context for kprobe */
-struct kprobe_step_ctx {
- unsigned long ss_pending;
- unsigned long match_addr;
-};
-
/* per-cpu kprobe control block */
struct kprobe_ctlblk {
unsigned int kprobe_status;
unsigned long saved_status;
struct prev_kprobe prev_kprobe;
- struct kprobe_step_ctx ss_ctx;
};
void arch_remove_kprobe(struct kprobe *p);