From: Nam Cao <namcao@linutronix.de>
To: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Nam Cao <namcao@linutronix.de>
Subject: [PATCH v2 00/11] riscv: kprobes: Clean up instruction simulation
Date: Wed, 14 May 2025 11:38:39 +0200 [thread overview]
Message-ID: <cover.1747215274.git.namcao@linutronix.de> (raw)
Hi,
There is some instruction-processing code in kprobes simulate code. These
code should be insn.h. In fact, most of them is duplicating insn.h.
This series remove the duplicated bits and make use of macros already
defined in insn.h. The non-duplicated bits are moved into insn.h.
v2:
rebase on top of Alex's patches [1]. This means replacing RV_X with
RV_X_mask for the first 2 patches. The rest is the same.
[1] https://lore.kernel.org/linux-riscv/20250508125202.108613-1-alexghiti@rivosinc.com/
Nam Cao (11):
riscv: kprobes: Move branch_rs2_idx to insn.h
riscv: kprobes: Move branch_funct3 to insn.h
riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM
riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG
riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM
riscv: kproves: Remove duplication of RVC_EXTRACT_JTYPE_IMM
riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG
riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM
riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG
riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM
riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM
arch/riscv/include/asm/insn.h | 9 +++
arch/riscv/kernel/probes/simulate-insn.c | 94 +++++-------------------
2 files changed, 28 insertions(+), 75 deletions(-)
--
2.39.5
next reply other threads:[~2025-05-14 9:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 9:38 Nam Cao [this message]
2025-05-14 9:38 ` [PATCH v2 01/11] riscv: kprobes: Move branch_rs2_idx to insn.h Nam Cao
2025-05-14 9:38 ` [PATCH v2 02/11] riscv: kprobes: Move branch_funct3 " Nam Cao
2025-05-14 9:38 ` [PATCH v2 03/11] riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM Nam Cao
2025-05-14 9:38 ` [PATCH v2 04/11] riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG Nam Cao
2025-05-14 9:38 ` [PATCH v2 05/11] riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM Nam Cao
2025-05-14 9:38 ` [PATCH v2 06/11] riscv: kproves: Remove duplication of RVC_EXTRACT_JTYPE_IMM Nam Cao
2025-05-14 9:38 ` [PATCH v2 07/11] riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG Nam Cao
2025-05-14 9:38 ` [PATCH v2 08/11] riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM Nam Cao
2025-05-14 9:38 ` [PATCH v2 09/11] riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG Nam Cao
2025-05-14 9:38 ` [PATCH v2 10/11] riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM Nam Cao
2025-05-14 9:38 ` [PATCH v2 11/11] riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM Nam Cao
2025-06-04 14:33 ` [PATCH v2 00/11] riscv: kprobes: Clean up instruction simulation patchwork-bot+linux-riscv
2025-07-08 10:25 ` Nam Cao
2025-07-08 13:27 ` Alexandre Ghiti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1747215274.git.namcao@linutronix.de \
--to=namcao@linutronix.de \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).