Skip to content

target/ppc: SPR registration cleanups

Fabiano Rosas qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest27 patches 3 repliesIn review
  2. v127 patches 33 repliesSuperseded

Changes in v2 from the cover letter

- Some commit message improvements suggested by David;

- Removed the soft_tlb rename patch. Kept the old name;

- Left the specific check_pow functions behind, they can be dealt with in the next series;

- Added a new patch to rename spr_tcg to spr_common.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27target/ppc: cpu_init: Remove not implemented commentstarget/ppc/cpu_init.c+253 -3290 replies
2/27target/ppc: cpu_init: Remove G2LE init codetarget/ppc/cpu_init.c+1 -410 replies
3/27target/ppc: cpu_init: Group registration of generic SPRstarget/ppc/cpu_init.c+32 -260 replies
4/27target/ppc: cpu_init: Move Timebase registration into the common functiontarget/ppc/cpu_init.c+18 -800 replies
5/27target/ppc: cpu_init: Avoid nested SPR register functionstarget/ppc/cpu_init.c+3 -30 replies
6/27target/ppc: cpu_init: Move 405 SPRs into register_405_sprstarget/ppc/cpu_init.c+13 -110 replies
7/27target/ppc: cpu_init: Move G2 SPRs into register_G2_sprstarget/ppc/cpu_init.c+22 -190 replies
8/27target/ppc: cpu_init: Decouple G2 SPR registration from 755target/ppc/cpu_init.c+20 -50 replies
9/27target/ppc: cpu_init: Decouple 74xx SPR registration from 7xxtarget/ppc/cpu_init.c+91 -160 replies
10/27target/ppc: cpu_init: Deduplicate 440 SPR registrationtarget/ppc/cpu_init.c+26 -740 replies
11/27target/ppc: cpu_init: Deduplicate 603 SPR registrationtarget/ppc/cpu_init.c+9 -190 replies
12/27target/ppc: cpu_init: Deduplicate 604 SPR registrationtarget/ppc/cpu_init.c+7 -100 replies
13/27target/ppc: cpu_init: Deduplicate 745/755 SPR registrationtarget/ppc/cpu_init.c+19 -310 replies
14/27target/ppc: cpu_init: Deduplicate 7xx SPR registrationtarget/ppc/cpu_init.c+11 -570 replies
15/27target/ppc: cpu_init: Move 755 L2 cache SPRs into a functiontarget/ppc/cpu_init.c+15 -90 replies
16/27target/ppc: cpu_init: Move e300 SPR registration into a functiontarget/ppc/cpu_init.c+35 -290 replies
17/27target/ppc: cpu_init: Move 604e SPR registration into a functiontarget/ppc/cpu_init.c+24 -190 replies
18/27target/ppc: cpu_init: Reuse init_proc_603 for the e300target/ppc/cpu_init.c+46 -580 replies
19/27target/ppc: cpu_init: Reuse init_proc_604 for the 604etarget/ppc/cpu_init.c+1 -110 replies
20/27target/ppc: cpu_init: Reuse init_proc_745 for the 755target/ppc/cpu_init.c+1 -170 replies
21/27target/ppc: cpu_init: Rename register_ne_601_sprstarget/ppc/cpu_init.c+20 -210 replies
22/27target/ppc: cpu_init: Remove register_usprg3_sprstarget/ppc/cpu_init.c+11 -100 replies
23/27target/ppc: Rename spr_tcg.h to spr_common.htarget/ppc/cpu_init.c target/ppc/spr_common.h target/ppc/translate.c+4 -41 reply
24/27target/ppc: cpu_init: Expose some SPR registration helperstarget/ppc/cpu_init.c target/ppc/spr_common.h+15 -70 replies
25/27target/ppc: cpu_init: Move SPR registration macros to a headertarget/ppc/cpu_init.c target/ppc/spr_common.h+65 -560 replies
26/27target/ppc: cpu_init: Move check_pow and QOM macros to a headertarget/ppc/cpu.h target/ppc/cpu_init.c+39 -371 reply
27/27target/ppc: Move common SPR functions out of cpu_inittarget/ppc/cpu_init.c target/ppc/helper_regs.c target/ppc/spr_common.h+403 -4000 replies

Reviews trailers per patch

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

PatchDavid Gibson
1/27R-b
2/27R-b
3/27R-b
4/27R-b
5/27R-b
6/27R-b
7/27R-b
8/27R-b
9/27R-b
10/27R-b
11/27R-b
12/27R-b
13/27R-b
14/27R-b
15/27R-b
16/27R-b
17/27R-b
18/27R-b
19/27R-b
20/27R-b
21/27R-b
22/27R-b
23/27R-b
24/27R-b
25/27R-b
26/27R-b
27/27R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/27] target/ppc: SPR registration cleanups

The goal of this series is to do some untangling of SPR registration code in cpu_init.c and prepare for moving the CPU initialization into separate files for each CPU family.

After this series we'll have only cpu-specific SPR code in cpu_init.c, i.e. code that can be split and moved as a unit into other files. Common/generic SPR code will be in helper_regs.c, exposed via spr_common.h.

Changes from v1:

- Some commit message improvements suggested by David;

- Removed the soft_tlb rename patch. Kept the old name;

- Left the specific check_pow functions behind, they can be dealt with in the next series;

- Added a new patch to rename spr_tcg to spr_common.

Patches 23 and 26 still need review.

This series is based on legoater/ppc7.0.

v1:
https://lists.nongnu.org/archive/html/qemu-ppc/2022-02/msg00313.html

Fabiano Rosas (27):
target/ppc: cpu_init: Remove not implemented comments target/ppc: cpu_init: Remove G2LE init code target/ppc: cpu_init: Group registration of generic SPRs target/ppc: cpu_init: Move Timebase registration into the common
function
target/ppc: cpu_init: Avoid nested SPR register functions target/ppc: cpu_init: Move 405 SPRs into register_405_sprs target/ppc: cpu_init: Move G2 SPRs into register_G2_sprs target/ppc: cpu_init: Decouple G2 SPR registration from 755 target/ppc: cpu_init: Decouple 74xx SPR registration from 7xx target/ppc: cpu_init: Deduplicate 440 SPR registration target/ppc: cpu_init: Deduplicate 603 SPR registration target/ppc: cpu_init: Deduplicate 604 SPR registration target/ppc: cpu_init: Deduplicate 745/755 SPR registration target/ppc: cpu_init: Deduplicate 7xx SPR registration target/ppc: cpu_init: Move 755 L2 cache SPRs into a function target/ppc: cpu_init: Move e300 SPR registration into a function target/ppc: cpu_init: Move 604e SPR registration into a function target/ppc: cpu_init: Reuse init_proc_603 for the e300 target/ppc: cpu_init: Reuse init_proc_604 for the 604e target/ppc: cpu_init: Reuse init_proc_745 for the 755 target/ppc: cpu_init: Rename register_ne_601_sprs target/ppc: cpu_init: Remove register_usprg3_sprs target/ppc: Rename spr_tcg.h to spr_common.h target/ppc: cpu_init: Expose some SPR registration helpers target/ppc: cpu_init: Move SPR registration macros to a header target/ppc: cpu_init: Move check_pow and QOM macros to a header target/ppc: Move common SPR functions out of cpu_init

 target/ppc/cpu.h                       |   39 +
 target/ppc/cpu_init.c                  | 1879 ++++++++----------------
 target/ppc/helper_regs.c               |  402 +++++
 target/ppc/{spr_tcg.h => spr_common.h} |   69 +-
 target/ppc/translate.c                 |    2 +-
 5 files changed, 1098 insertions(+), 1293 deletions(-)
 rename target/ppc/{spr_tcg.h => spr_common.h} (72%)
Signature · 1 line
2.34.1