From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Jared Mauch" <jared+home@puck.nether.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, devel@lists.libvirt.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 5/7] hw/arm/raspi4b: Expose the raspi4b-1g machine on 64-bit hosts
Date: Sat, 1 Feb 2025 10:15:26 +0100 [thread overview]
Message-ID: <20250201091528.1177-6-philmd@linaro.org> (raw)
In-Reply-To: <20250201091528.1177-1-philmd@linaro.org>
There is no particular reason to not have the raspi4b-1g machine
available on 64-bit hosts, so expose it there.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/raspi4b.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/arm/raspi4b.c b/hw/arm/raspi4b.c
index 713b4693a49..59b0d2ced44 100644
--- a/hw/arm/raspi4b.c
+++ b/hw/arm/raspi4b.c
@@ -107,7 +107,6 @@ static void raspi4b_machine_init(MachineState *machine)
raspi_base_machine_init(machine, &soc->parent_obj);
}
-#if HOST_LONG_BITS == 32
static void raspi4b_1g_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -117,9 +116,12 @@ static void raspi4b_1g_machine_class_init(ObjectClass *oc, void *data)
raspi_machine_class_common_init(mc, rmc->board_rev);
mc->init = raspi4b_machine_init;
+#if HOST_LONG_BITS == 32
mc->alias = "raspi4b";
+#endif
}
-#else
+
+#if HOST_LONG_BITS > 32
static void raspi4b_2g_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -131,22 +133,21 @@ static void raspi4b_2g_machine_class_init(ObjectClass *oc, void *data)
mc->init = raspi4b_machine_init;
mc->alias = "raspi4b";
}
-#endif
+#endif /* HOST_LONG_BITS > 32 */
static const TypeInfo raspi4_machine_types[] = {
-#if HOST_LONG_BITS == 32
{
.name = MACHINE_TYPE_NAME("raspi4b-1g"),
.parent = TYPE_RASPI4_MACHINE,
.class_init = raspi4b_1g_machine_class_init,
},
-#else
+#if HOST_LONG_BITS > 32
{
.name = MACHINE_TYPE_NAME("raspi4b-2g"),
.parent = TYPE_RASPI4_MACHINE,
.class_init = raspi4b_2g_machine_class_init,
},
-#endif
+#endif /* HOST_LONG_BITS > 32 */
{
.name = TYPE_RASPI4_MACHINE,
.parent = TYPE_RASPI_BASE_MACHINE,
--
2.47.1
next prev parent reply other threads:[~2025-02-01 9:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 9:15 [PATCH 0/7] hw/arm/raspi4b: Add models with 4GB and 8GB of DRAM Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 1/7] hw/arm/raspi4b: Declare machine types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 2/7] hw/arm/raspi4b: Introduce abstract raspi4-base machine type Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 3/7] hw/arm/raspi4b: Split raspi4b_machine_class_init() in two (1g and 2g) Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 4/7] hw/arm/raspi4b: Rename as raspi4b-1g / raspi4b-2g, deprecating old name Philippe Mathieu-Daudé
2025-02-01 14:30 ` Philippe Mathieu-Daudé
2025-02-01 9:15 ` Philippe Mathieu-Daudé [this message]
2025-02-01 9:15 ` [PATCH 6/7] hw/arm/raspi4b: Add the raspi4b-4g machine Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 7/7] hw/arm/raspi4b: Add the raspi4b-8g machine Philippe Mathieu-Daudé
2025-02-01 12:57 ` [PATCH 0/7] hw/arm/raspi4b: Add models with 4GB and 8GB of DRAM BALATON Zoltan
2025-02-01 13:51 ` Peter Maydell
2025-02-03 14:29 ` Alex Bennée
2025-02-03 14:33 ` Daniel P. Berrangé
2025-02-03 14:45 ` Peter Maydell
2025-02-03 14:50 ` Daniel P. Berrangé
2025-02-03 15:05 ` Peter Maydell
2025-02-03 16:19 ` Philippe Mathieu-Daudé
2025-02-03 23:20 ` BALATON Zoltan
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=20250201091528.1177-6-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=devel@lists.libvirt.org \
--cc=jared+home@puck.nether.net \
--cc=peter.maydell@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).