Skip to content

ppc: cpu_model handling cleanups

Igor Mammedov qemu-devel 2 versions – Applied

Status from this message: I've applied patch 8 with this change folded in, so as not to break

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 10 repliesApplied
  2. v16 patches 24 repliesSuperseded

Changes in v2 from the cover letter

- normalize all cpu model names to lower-case
- check that all cpu model string is consumed before going to PVR lookup path
- add a new optional patch to remove unused junk '[PATCH v2 8/8] ppc: remove non implemented cpu models'
- pull in dependency patch from
https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg03364.html
'ppc: replace cpu_ppc_init() with cpu_generic_init()'
so this series won't depend unnecessarily on another series

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8ppc: replace cpu_ppc_init() with cpu_generic_init()hw/ppc/e500.c hw/ppc/mac_newworld.c hw/ppc/mac_oldworld.c +6 more+13 -150 replies
2/8ppc: use macros to make cpu type name from string literaltarget/ppc/cpu-models.c target/ppc/cpu.h target/ppc/kvm.c +2 more+9 -60 replies
3/8ppc: make cpu_model translation to type consistenthw/ppc/spapr_cpu_core.c target/ppc/cpu-models.c target/ppc/kvm.c +1 more+390 -3900 replies
4/8ppc: make cpu alias point only to real cpu modelstarget/ppc/cpu-models.c target/ppc/cpu-models.h+31 -270 replies
5/8ppc: replace inter-function cyclic dependency/recurssion with 2 simple lookupstarget/ppc/translate_init.c+13 -300 replies
6/8ppc: simplify cpu model lookup by PVRtarget/ppc/translate_init.c+11 -160 replies
7/8ppc: drop caching ObjectClass from PowerPCCPUAliastarget/ppc/cpu-models.h target/ppc/kvm.c target/ppc/translate_init.c+2 -260 replies
8/8ppc: remove non implemented cpu modelstarget/ppc/cpu-models.c+0 -4599 replies

Reviews trailers per patch

5 of 8 patches have a Reviewed-by or Acked-by.

PatchDavid GibsonHervé PoussineauEduardo HabkostThomas Huth
1/8A-b R-b R-b
2/8R-b
3/8
4/8A-b
5/8R-b
6/8
7/8
8/8Spotted-by 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 4 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/8] ppc: cpu_model handling cleanups

Changelog since v1:
- normalize all cpu model names to lower-case
- check that all cpu model string is consumed before going to PVR lookup path
- add a new optional patch to remove unused junk '[PATCH v2 8/8] ppc: remove non implemented cpu models'
- pull in dependency patch from
https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg03364.html
'ppc: replace cpu_ppc_init() with cpu_generic_init()'
so this series won't depend unnecessarily on another series

While removing cpu_init() tree-wide, I've stumbled uppon PPC way of parsing cpu_model which looked way too complex compared to other targets.

So here goes cleanups that instead of current inconsistent way of dealing with cpu models
- mix of case-(in)sensetive lookups and cpu model names
- aliases pointing to another aliases
normalize cpu model names to upper-case and make aliases point to cpu moldel names. These changes allow to simplify cpu model handling quite a bit and make it look/behave a bit more in line with other targets.

Patches are not must have for cpu_init() removal but make it a little bit easier without need to deal with way of conversion of cpu model to cpu type, so pls consider merging it early once 2.11 merge window is open if patches make any sense.

repo for testing:
https://github.com/imammedo/qemu.git ppc_cpu_model_cleanups_V2

CC David Gibson <[email protected]>
CC Alexander Graf <[email protected]>

Igor Mammedov (8):
ppc: replace cpu_ppc_init() with cpu_generic_init()
ppc: use macros to make cpu type name from string literal
ppc: make cpu_model translation to type consistent
ppc: make cpu alias point only to real cpu models
ppc: replace inter-function cyclic dependency/recurssion with 2 simple
lookups
ppc: simplify cpu model lookup by PVR
ppc: drop caching ObjectClass from PowerPCCPUAlias
ppc: remove non implemented cpu models

 target/ppc/cpu-models.h     |    3 +-
 target/ppc/cpu.h            |    6 +-
 target/ppc/kvm_ppc.h        |    2 +-
 hw/ppc/e500.c               |    3 +-
 hw/ppc/mac_newworld.c       |    3 +-
 hw/ppc/mac_oldworld.c       |    3 +-
 hw/ppc/ppc440_bamboo.c      |    2 +-
 hw/ppc/ppc4xx_devs.c        |    2 +-
 hw/ppc/prep.c               |    5 +-
 hw/ppc/spapr_cpu_core.c     |   24 +-
 hw/ppc/virtex_ml507.c       |    2 +-
 target/ppc/cpu-models.c     | 1023 ++++++++++++-------------------------------
 target/ppc/kvm.c            |    5 +-
 target/ppc/translate_init.c |  105 ++---
 14 files changed, 344 insertions(+), 844 deletions(-)
Signature · 1 line
2.7.4