qemu/target/ppc
Aditya Gupta 4715a0e9e6 hw/ppc: Fix build error with CONFIG_POWERNV disabled
Currently when CONFIG_POWERNV is not enabled, the build fails, such as
with --without-default-devices:

    $ ./configure --without-default-devices
    $ make

    [281/283] Linking target qemu-system-ppc64
    FAILED: qemu-system-ppc64
    cc -m64 @qemu-system-ppc64.rsp
    /usr/bin/ld: libqemu-ppc64-softmmu.a.p/target_ppc_misc_helper.c.o: in function `helper_load_sprd':
    .../target/ppc/misc_helper.c:335:(.text+0xcdc): undefined reference to `pnv_chip_find_core'
    /usr/bin/ld: libqemu-ppc64-softmmu.a.p/target_ppc_misc_helper.c.o: in function `helper_store_sprd':
    .../target/ppc/misc_helper.c:375:(.text+0xdf4): undefined reference to `pnv_chip_find_core'
    collect2: error: ld returned 1 exit status
    ...

This is since target/ppc/misc_helper.c references PowerNV specific
'pnv_chip_find_core' call.

Split the PowerNV specific SPRD code out of the generic PowerPC code, by
moving the SPRD code to pnv.c

Fixes: 9808ce6d5c ("target/ppc: Big-core scratch register fix")
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Reported-by: Thomas Huth <thuth@redhat.com>
Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Acked-by: Cédric Le Goater <clg@redhat.com>
Message-ID: <20250820122516.949766-2-adityag@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 46d03bb23d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-09-04 23:17:16 +03:00
..
translate target/ppc: Fix facility interrupt checks for VSX 2025-03-21 13:54:35 +10:00
arch_dump.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
compat.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cpu_init.c target/ppc: Fill in TCGCPUOps.pointer_wrap 2025-05-28 08:08:48 +01:00
cpu_init.h target/ppc: Add Power11 DD2.0 processor 2024-11-04 09:12:42 +10:00
cpu-models.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cpu-models.h target/ppc: Add Power11 DD2.0 processor 2024-11-04 09:12:42 +10:00
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 2025-04-23 15:07:32 -07:00
cpu-qom.h target/ppc: Use GDBFeature for dynamic XML 2024-02-28 09:09:25 +00:00
cpu.c include/exec: Split out watchpoint.h 2025-04-23 14:08:36 -07:00
cpu.h hw/ppc: Fix build error with CONFIG_POWERNV disabled 2025-09-04 23:17:16 +03:00
dfp_helper.c target/ppc: replace assert(0) with g_assert_not_reached() 2024-09-24 13:53:35 +02:00
excp_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
fpu_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
gdbstub.c target/ppc: Fix GDB register indexing on secondary CPUs 2024-03-30 18:50:24 +10:00
helper_regs.c accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
helper_regs.h codebase: prepare to remove cpu.h from exec/exec-all.h 2025-04-23 13:52:25 -07:00
helper.h ppc: Enable 2nd DAWR support on Power10 PowerNV machine 2025-03-11 22:43:32 +10:00
insn32.decode target/ppc: Move VSX fp compare insns to decodetree. 2024-07-26 09:51:33 +10:00
insn64.decode target/ppc: Implemented [pm]xvbf16ger2* 2022-05-26 17:11:33 -03:00
int_helper.c target/ppc: Move VMX integer add/sub saturate insns to decodetree. 2024-07-26 09:51:33 +10:00
internal.h accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
Kconfig ppc: switch boards to "default y" 2024-05-03 15:47:47 +02:00
kvm_ppc.h cleanup: Drop pointless return at end of function 2025-04-24 09:33:42 +02:00
kvm.c kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
machine.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mem_helper.c accel/tcg: Split out accel/tcg/helper-retaddr.h 2025-04-30 12:45:06 -07:00
meson.build target/ppc: Move TCG specific exception handlers to tcg-excp_helper.c 2025-03-11 22:43:31 +10:00
misc_helper.c hw/ppc: Fix build error with CONFIG_POWERNV disabled 2025-09-04 23:17:16 +03:00
mmu_common.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mmu_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mmu-book3s-v3.c exec/cpu-all: remove system/memory include 2025-04-23 15:04:57 -07:00
mmu-book3s-v3.h target/ppc: Remove includes from mmu-book3s-v3.h 2024-07-26 09:51:34 +10:00
mmu-booke.c target/ppc: Move out BookE and related MMU functions from mmu_common.c 2024-05-24 09:43:13 +10:00
mmu-booke.h target/ppc: Move out BookE and related MMU functions from mmu_common.c 2024-05-24 09:43:13 +10:00
mmu-books.h target/ppc: introduce mmu-books.h 2021-07-09 10:38:19 +10:00
mmu-hash32.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mmu-hash32.h exec/cpu-all: remove system/memory include 2025-04-23 15:04:57 -07:00
mmu-hash64.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mmu-hash64.h qemu: Declare all load/store helper in 'qemu/bswap.h' 2025-07-15 02:56:39 -04:00
mmu-radix64.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
mmu-radix64.h target/ppc/mmu-radix64: Remove externally unused parts from header 2024-07-26 09:51:34 +10:00
power8-pmu-regs.c.inc target/ppc: Add new hflags to support BHRB 2024-05-24 08:57:50 +10:00
power8-pmu.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
power8-pmu.h target/ppc: Add recording of taken branches to BHRB 2024-05-24 09:33:06 +10:00
ppc-qmp-cmds.c qapi: make most CPU commands unconditionally available 2025-05-28 18:55:50 +02:00
spr_common.h ppc: Enable 2nd DAWR support on Power10 PowerNV machine 2025-03-11 22:43:32 +10:00
tcg-excp_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
tcg-stub.c hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep 2024-02-23 23:24:42 +10:00
timebase_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
trace-events target/ppc: Improve KVM hypercall trace 2022-04-20 18:00:30 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
user_only_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00