From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Frédéric Barrat" <fbarrat@linux.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
qemu-ppc@nongnu.org, "Cédric Le Goater" <clg@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Huth" <thuth@redhat.com>
Subject: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
Date: Mon, 26 May 2025 13:23:46 +0200 [thread overview]
Message-ID: <20250526112346.48744-4-philmd@linaro.org> (raw)
In-Reply-To: <20250526112346.48744-1-philmd@linaro.org>
Since commit 9808ce6d5cb, building QEMU configured with
'--without-default-devices' fails:
Undefined symbols for architecture arm64:
"_pnv_chip_find_core", referenced from:
_helper_load_sprd in target_ppc_misc_helper.c.o
_helper_store_sprd in target_ppc_misc_helper.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
Fix by adding a stub when CONFIG_POWERNV is not available.
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 9808ce6d5cb ("target/ppc: Big-core scratch register fix")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ppc/pnv_stub.c | 15 +++++++++++++++
hw/ppc/meson.build | 3 ++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 hw/ppc/pnv_stub.c
diff --git a/hw/ppc/pnv_stub.c b/hw/ppc/pnv_stub.c
new file mode 100644
index 00000000000..8d11c8b65bb
--- /dev/null
+++ b/hw/ppc/pnv_stub.c
@@ -0,0 +1,15 @@
+/*
+ * QEMU PowerPC PowerNV stubs
+ *
+ * Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "hw/ppc/pnv.h"
+
+PnvCore *pnv_chip_find_core(PnvChip *chip, uint32_t core_id)
+{
+ g_assert_not_reached();
+}
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index 9893f8adebb..02f248f5f46 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -55,7 +55,8 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files(
'pnv_pnor.c',
'pnv_nest_pervasive.c',
'pnv_n1_chiplet.c',
-))
+), if_false: files('pnv_stub.c'))
+
# PowerPC 4xx boards
ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
'ppc440_bamboo.c',
--
2.47.1
next prev parent reply other threads:[~2025-05-26 11:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 11:23 [PATCH 0/3] hw/ppc: Fix --without-default-devices build Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
2025-05-26 11:55 ` Thomas Huth
2025-05-26 11:57 ` Thomas Huth
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
2025-05-26 11:34 ` Thomas Huth
2025-05-26 11:48 ` Cédric Le Goater
2025-05-26 11:23 ` Philippe Mathieu-Daudé [this message]
2025-05-26 11:48 ` [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core() Cédric Le Goater
2025-05-26 11:51 ` Philippe Mathieu-Daudé
2025-07-13 11:18 ` Michael Tokarev
2025-08-10 8:00 ` Michael Tokarev
2025-08-20 6:52 ` Aditya Gupta
2025-07-22 18:04 ` Aditya Gupta
2025-08-11 8:40 ` Philippe Mathieu-Daudé
2025-08-20 12:30 ` Aditya Gupta
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=20250526112346.48744-4-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=anisinha@redhat.com \
--cc=clg@redhat.com \
--cc=danielhb413@gmail.com \
--cc=fbarrat@linux.ibm.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.