Skip to content

target/riscv: Some CPURISCVState related cleanup and simplification

Weiwei Li qemu-devel qemu-riscv 1 version Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4target/riscv: Avoid env_archcpu() when reading RISCVCPUConfigtarget/riscv/cpu_helper.c target/riscv/csr.c target/riscv/gdbstub.c+18 -352 replies
2/4target/riscv: Simplify getting RISCVCPU pointer from envtarget/riscv/pmu.c+4 -43 replies
3/4target/riscv: Simplify type conversion for CPURISCVStatetarget/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_helper.c +4 more+31 -442 replies
4/4target/riscv: Simplify arguments for riscv_csrrw_checktarget/riscv/csr.c+4 -83 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchDaniel Henrique BarbozaAlistair FrancisPhilippe Mathieu-Daudé
1/4R-b R-b
2/4R-b R-b R-b
3/4R-b R-b
4/4R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] target/riscv: Some CPURISCVState related cleanup and simplification

The patchset tries to:

- Use riscv_cpu_cfg(env) instead of env_archcpu().cfg.
- Use env_archcpu() to get RISCVCPU pointer from env directly
- Use CPURISCVState as argument directly in riscv_cpu_update_mip and riscv_timer_write_timecmp to simplify type conversion
- Remove RISCVCPU argument of riscv_csrrw_check, and get cfg infomation from CPURISCVState directly

The port is available here:
https://github.com/plctlab/plct-qemu/tree/plct-cleanup-upstream

Weiwei Li (4):
target/riscv: Avoid env_archcpu() when reading RISCVCPUConfig target/riscv: Simplify getting RISCVCPU pointer from env target/riscv: Simplify type conversion for CPURISCVState target/riscv: Simplify arguments for riscv_csrrw_check

 target/riscv/cpu.c         |  6 +--
 target/riscv/cpu.h         |  3 +-
 target/riscv/cpu_helper.c  | 17 ++++----
 target/riscv/csr.c         | 87 ++++++++++++--------------------------
 target/riscv/gdbstub.c     |  4 +-
 target/riscv/pmu.c         | 14 +++---
 target/riscv/time_helper.c | 15 +++----
 target/riscv/time_helper.h |  2 +-
 8 files changed, 57 insertions(+), 91 deletions(-)
Signature · 1 line
2.25.1