qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>
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	[thread overview]
Message-ID: <9a45b5fb-09ba-4bb4-a91e-85dfb9b3031c@linaro.org> (raw)
In-Reply-To: <20240603160933.1141717-3-peter.maydell@linaro.org>

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	other threads:[~2024-06-11  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 16:09 [PATCH 0/3] cpu_exec_halt: make method mandatory Peter Maydell
2024-06-03 16:09 ` [PATCH 1/3] target/arm: Set arm_v7m_tcg_ops cpu_exec_halt to arm_cpu_exec_halt() Peter Maydell
2024-06-11  8:26   ` Philippe Mathieu-Daudé
2024-06-03 16:09 ` [PATCH 2/3] target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation Peter Maydell
2024-06-11  8:17   ` Philippe Mathieu-Daudé [this message]
2024-06-03 16:09 ` [PATCH 3/3] accel/tcg: Make TCGCPUOps::cpu_exec_halt mandatory Peter Maydell
2024-06-11  8:25   ` Philippe Mathieu-Daudé
2024-06-11  8:36     ` Peter Maydell
2024-06-11  9:58       ` Philippe Mathieu-Daudé
2024-06-04  1:03 ` [PATCH 0/3] cpu_exec_halt: make method mandatory Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a45b5fb-09ba-4bb4-a91e-85dfb9b3031c@linaro.org \
    --to=philmd@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).