mbox series

[RFC,v2,0/8] cpu: Move CPUClass::has_work() to TCGCPUOps

Message ID 20210304222323.1954755-1-f4bug@amsat.org (mailing list archive)
Headers show
Series cpu: Move CPUClass::has_work() to TCGCPUOps | expand

Message

Philippe Mathieu-Daudé March 4, 2021, 10:23 p.m. UTC
Hi,

cpu_has_work() isn't used out of TCG, so restrict it to it.
RFC because maybe it could?

Since v1:
- finished PPC
- check cc->tcg_ops->has_work non-null (thuth)

Based-on: <20210227232519.222663-1-richard.henderson@linaro.org>

Philippe Mathieu-Daudé (8):
  sysemu/tcg: Restrict tcg_exec_init() to CONFIG_TCG
  sysemu/tcg: Restrict qemu_tcg_mttcg_enabled() to TCG
  target/arm: Directly use arm_cpu_has_work instead of
    CPUClass::has_work
  target/s390x: Move s390_cpu_has_work to excp_helper.c
  target/ppc: Duplicate the TCGCPUOps structure for POWER CPUs
  cpu: Declare cpu_has_work() in 'sysemu/tcg.h'
  cpu: Move CPUClass::has_work() to TCGCPUOps
  target/arm: Restrict arm_cpu_has_work() to TCG

 include/hw/core/cpu.h           | 27 -----------
 include/hw/core/tcg-cpu-ops.h   |  4 ++
 include/sysemu/tcg.h            | 30 +++++++++++--
 target/arm/internals.h          |  1 +
 target/s390x/internal.h         |  1 +
 accel/tcg/cpu-exec.c            | 12 +++++
 hw/core/cpu.c                   |  6 ---
 softmmu/cpus.c                  |  1 +
 target/alpha/cpu.c              |  2 +-
 target/arm/cpu.c                |  6 +--
 target/arm/op_helper.c          |  2 +-
 target/avr/cpu.c                |  2 +-
 target/cris/cpu.c               |  3 +-
 target/hexagon/cpu.c            |  2 +-
 target/hppa/cpu.c               |  2 +-
 target/i386/cpu.c               |  7 +--
 target/i386/tcg/tcg-cpu.c       |  6 +++
 target/lm32/cpu.c               |  2 +-
 target/m68k/cpu.c               |  2 +-
 target/microblaze/cpu.c         |  2 +-
 target/mips/cpu.c               |  2 +-
 target/moxie/cpu.c              |  2 +-
 target/nios2/cpu.c              |  2 +-
 target/openrisc/cpu.c           |  2 +-
 target/riscv/cpu.c              |  2 +-
 target/rx/cpu.c                 |  2 +-
 target/s390x/cpu.c              | 19 +-------
 target/s390x/excp_helper.c      | 18 ++++++++
 target/sh4/cpu.c                |  2 +-
 target/sparc/cpu.c              |  2 +-
 target/tilegx/cpu.c             |  2 +-
 target/tricore/cpu.c            |  2 +-
 target/unicore32/cpu.c          |  2 +-
 target/xtensa/cpu.c             |  2 +-
 tcg/tcg.c                       |  1 +
 target/ppc/translate_init.c.inc | 79 ++++++++++++++++++++++++++++++---
 36 files changed, 171 insertions(+), 90 deletions(-)

Comments

Philippe Mathieu-Daudé March 13, 2021, 11:55 p.m. UTC | #1
Hi Richard,

On 3/4/21 11:23 PM, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> cpu_has_work() isn't used out of TCG, so restrict it to it.
> RFC because maybe it could?
> 
> Since v1:
> - finished PPC
> - check cc->tcg_ops->has_work non-null (thuth)
> 
> Based-on: <20210227232519.222663-1-richard.henderson@linaro.org>
> 
> Philippe Mathieu-Daudé (8):
>   sysemu/tcg: Restrict tcg_exec_init() to CONFIG_TCG
>   sysemu/tcg: Restrict qemu_tcg_mttcg_enabled() to TCG

Patches 1 & 2 are reviewed, could you take them via your
TCG tree?

Regards,

Phil.