Add RISC-V asm/insn.h header
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 2 repliesIn review
- v27 patches 2 repliesSuperseded
- v17 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- Split the range check fix out and send it separately.
- Convert "if (IS_DEFINED(CONFIG_32BIT))" to #ifdef to avoid compiler warning on rv32. Thanks kernel test robot!
- Add sp register, load/store instructions and RISCV_INSN_REG_L, RISCV_INSN_REG_S and RISC_INSN_SZREG macros to work on both rv32 and rv64 to the asm/insn.h header.
- Add patch moving unneded definitions out of out asm/ftrace.h and a patch converting kernel/ftrace.c to use the header.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | riscv: Avoid unaligned access when relocating modulesarch/ | +76 | 2 replies | |
| 2/8 | riscv: Remove unneeded definitions from asm/module.harch/ arch/ | +90 | 0 replies | |
| 3/8 | riscv: Remove unneeded definitions from asm/ftrace.harch/ arch/ | +36 | 0 replies | |
| 4/8 | riscv: Add asm/insn.h headerarch/ | +151 | 0 replies | |
| 5/8 | riscv: Use asm/insn.h for module relocationsarch/ | +56 | 0 replies | |
| 6/8 | riscv: Use asm/insn.h to generate plt entriesarch/ | +4 | 0 replies | |
| 7/8 | riscv: Use asm/insn.h for jump labelsarch/ | +3 | 0 replies | |
| 8/8 | riscv: Use asm/insn.h for dynamic ftracearch/ | +22 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/8] Add RISC-V asm/insn.h header
This series adds a RISC-V asm/insn.h header to consolidate instruction generation and manipulation similar to arm64's asm/insn.h.
The first three patches are preparatory patches fixing unaligned access in module relocations and moving unneded definitions out of asm/module.h and asm/ftrace.h.
Patch 4 adds the header and the remaining patches converts module relocation, plt entry, jump label and dynamic ftrace code to use it.
The only obvious code left to convert is the BPF JIT(s).
This series depends on the module relocation range check fix here:
https://lore.kernel.org/linux-riscv/[email protected]/
Changes since v2:
- Split the range check fix out and send it separately.
- Convert "if (IS_DEFINED(CONFIG_32BIT))" to #ifdef to avoid compiler warning on rv32. Thanks kernel test robot!
- Add sp register, load/store instructions and RISCV_INSN_REG_L, RISCV_INSN_REG_S and RISC_INSN_SZREG macros to work on both rv32 and rv64 to the asm/insn.h header.
- Add patch moving unneded definitions out of out asm/ftrace.h and a patch converting kernel/ftrace.c to use the header.
Changes since v1:
- Send the right patches.
Emil Renner Berthing (8):
riscv: Avoid unaligned access when relocating modules
riscv: Remove unneeded definitions from asm/module.h
riscv: Remove unneeded definitions from asm/ftrace.h
riscv: Add asm/insn.h header
riscv: Use asm/insn.h for module relocations
riscv: Use asm/insn.h to generate plt entries
riscv: Use asm/insn.h for jump labels
riscv: Use asm/insn.h for dynamic ftrace
arch/riscv/include/asm/ftrace.h | 35 +---- arch/riscv/include/asm/insn.h | 151 ++++++++++++++++++ arch/riscv/include/asm/module.h | 87 ---------- arch/riscv/kernel/ftrace.c | 56 ++++--- arch/riscv/kernel/jump_label.c | 12 +- arch/riscv/kernel/module-sections.c | 71 +++++++++ arch/riscv/kernel/module.c | 236 +++++++++++++--------------- 7 files changed, 364 insertions(+), 284 deletions(-) create mode 100644 arch/riscv/include/asm/insn.h
Signature · 1 line
2.35.1