qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@gmail.com>,
	 Fabien Chouteau <chouteau@adacore.com>,
	Frederic Konrad <konrad.frederic@yahoo.fr>,
	 Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH 2/2] hw/sparc/leon3: Remove duplicated code
Date: Tue, 30 Jan 2024 15:26:43 +0100	[thread overview]
Message-ID: <CAJ307EhCyuiO3w=2-BhAOAmCuzCTaifer-1ixKgrsr_DmZNphw@mail.gmail.com> (raw)
In-Reply-To: <20240130113102.6732-3-philmd@linaro.org>

On Tue, Jan 30, 2024 at 12:31 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> Since commit b04d989054 ("SPARC: Emulation of Leon3") the
> main_cpu_reset() handler sets both pc/npc when the CPU is
> reset, after the machine is realized. It is pointless to
> set it in leon3_generic_hw_init().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/sparc/leon3.c | 2 --
>  1 file changed, 2 deletions(-)

Thanks for those cleanups !
Reviewed-by: Clément Chigot <chigot@adacore.com>


> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index 2dfb742566..1ae9a37583 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -343,8 +343,6 @@ static void leon3_generic_hw_init(MachineState *machine)
>
>              bootloader_entry = memory_region_get_ram_ptr(prom);
>              write_bootloader(env, bootloader_entry, entry);
> -            env->pc = LEON3_PROM_OFFSET;
> -            env->npc = LEON3_PROM_OFFSET + 4;
>              reset_info->entry = LEON3_PROM_OFFSET;
>          }
>      }
> --
> 2.41.0
>


  reply	other threads:[~2024-01-30 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 11:31 [PATCH 0/2] hw/sparc/leon3: Minor cleanups Philippe Mathieu-Daudé
2024-01-30 11:31 ` [PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member Philippe Mathieu-Daudé
2024-01-30 14:22   ` Clément Chigot
2024-01-30 11:31 ` [PATCH 2/2] hw/sparc/leon3: Remove duplicated code Philippe Mathieu-Daudé
2024-01-30 14:26   ` Clément Chigot [this message]
2024-02-15 14:59 ` [PATCH 0/2] hw/sparc/leon3: Minor cleanups 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='CAJ307EhCyuiO3w=2-BhAOAmCuzCTaifer-1ixKgrsr_DmZNphw@mail.gmail.com' \
    --to=chigot@adacore.com \
    --cc=atar4qemu@gmail.com \
    --cc=chouteau@adacore.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.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).