qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v2 01/10] hw/core/generic-loader: Do not open-code cpu_set_pc()
Date: Fri, 24 Jan 2025 11:25:29 -0800	[thread overview]
Message-ID: <b985ddf4-cc3e-4b89-8e69-7b71dad73d28@linaro.org> (raw)
In-Reply-To: <20250122093028.52416-2-philmd@linaro.org>

On 1/22/25 01:30, Philippe Mathieu-Daudé wrote:
> Directly call cpu_set_pc() instead of open-coding it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/core/generic-loader.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
> index fb354693aff..1b9ab600c9c 100644
> --- a/hw/core/generic-loader.c
> +++ b/hw/core/generic-loader.c
> @@ -48,11 +48,8 @@ static void generic_loader_reset(void *opaque)
>       GenericLoaderState *s = GENERIC_LOADER(opaque);
>   
>       if (s->set_pc) {
> -        CPUClass *cc = CPU_GET_CLASS(s->cpu);
>           cpu_reset(s->cpu);
> -        if (cc) {
> -            cc->set_pc(s->cpu, s->addr);
> -        }
> +        cpu_set_pc(s->cpu, s->addr);
>       }
>   
>       if (s->data_len) {

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2025-01-24 19:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22  9:30 [PATCH v2 00/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 01/10] hw/core/generic-loader: Do not open-code cpu_set_pc() Philippe Mathieu-Daudé
2025-01-24 19:25   ` Richard Henderson [this message]
2025-01-22  9:30 ` [PATCH v2 02/10] gdbstub: Clarify no more than @gdb_num_core_regs can be accessed Philippe Mathieu-Daudé
2025-01-22  9:32   ` Philippe Mathieu-Daudé
2025-01-22 20:55   ` Alex Bennée
2025-01-22  9:30 ` [PATCH v2 03/10] cpus: Cache CPUClass early in instance_init() handler Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 04/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 05/10] accel: " Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 06/10] user: " Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 07/10] disas: " Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 08/10] gdbstub: " Philippe Mathieu-Daudé
2025-01-22 21:34   ` Alex Bennée
2025-01-22  9:30 ` [PATCH v2 09/10] hw/acpi: " Philippe Mathieu-Daudé
2025-01-22  9:30 ` [PATCH v2 10/10] target/arm: " Philippe Mathieu-Daudé
2025-02-10 21:56 ` [PATCH v2 00/10] cpus: " Philippe Mathieu-Daudé

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=b985ddf4-cc3e-4b89-8e69-7b71dad73d28@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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).