qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] target: Set TCGCPUOps::cpu_exec_halt to target's has_wor


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/3] target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation
Date: Tue, 11 Jun 2024 10:17:11 +0200
User-agent: Mozilla Thunderbird

On 3/6/24 18:09, Peter Maydell wrote:
Currently the TCGCPUOps::cpu_exec_halt method is optional, and if it
is not set then the default is to call the CPUClass::has_work
method (which has an identical function signature).

We would like to make the cpu_exec_halt method mandatory so we can
remove the runtime check and fallback handling.  In preparation for
that, make all the targets which don't need special handling in their
cpu_exec_halt set it to their cpu_has_work implementation instead of
leaving it unset.  (This is every target except for arm and i386.)

In the riscv case this requires us to make the function not
be local to the source file it's defined in.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  target/riscv/internals.h   | 3 +++
  target/alpha/cpu.c         | 1 +
  target/avr/cpu.c           | 1 +
  target/cris/cpu.c          | 2 ++
  target/hppa/cpu.c          | 1 +
  target/loongarch/cpu.c     | 1 +
  target/m68k/cpu.c          | 1 +
  target/microblaze/cpu.c    | 1 +
  target/mips/cpu.c          | 1 +
  target/openrisc/cpu.c      | 1 +
  target/ppc/cpu_init.c      | 2 ++
  target/riscv/cpu.c         | 2 +-
  target/riscv/tcg/tcg-cpu.c | 2 ++
  target/rx/cpu.c            | 1 +
  target/s390x/cpu.c         | 1 +
  target/sh4/cpu.c           | 1 +
  target/sparc/cpu.c         | 1 +
  target/xtensa/cpu.c        | 1 +
  18 files changed, 23 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]