From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Artyom Tarasenko" <atar4qemu@gmail.com>,
"Fabien Chouteau" <chouteau@adacore.com>,
"Frederic Konrad" <konrad.frederic@yahoo.fr>,
"Clément Chigot" <chigot@adacore.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/2] hw/sparc/leon3: Remove duplicated code
Date: Tue, 30 Jan 2024 12:31:02 +0100 [thread overview]
Message-ID: <20240130113102.6732-3-philmd@linaro.org> (raw)
In-Reply-To: <20240130113102.6732-1-philmd@linaro.org>
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(-)
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
next prev parent reply other threads:[~2024-01-30 11:31 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 ` Philippe Mathieu-Daudé [this message]
2024-01-30 14:26 ` [PATCH 2/2] hw/sparc/leon3: Remove duplicated code Clément Chigot
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=20240130113102.6732-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=atar4qemu@gmail.com \
--cc=chigot@adacore.com \
--cc=chouteau@adacore.com \
--cc=konrad.frederic@yahoo.fr \
--cc=mark.cave-ayland@ilande.co.uk \
--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).