qemu/hw/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
..
amigaone.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
e500-ccsr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500.c hw: Fix type constant for DTB files 2025-06-17 09:54:51 +02:00
e500.h hw/ppc/e500: Move clock and TB frequency to machine class 2025-06-10 12:59:09 +02:00
e500plat.c hw/ppc/e500: Move clock and TB frequency to machine class 2025-06-10 12:59:09 +02:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
fw_cfg.c hw/ppc: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
Kconfig ppc/ppc405: Remove boards 2025-03-11 22:40:47 +10:00
mac_newworld.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
mac_oldworld.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
meson.build ppc/ppc405: Remove boards 2025-03-11 22:40:47 +10:00
mpc8544_guts.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
mpc8544ds.c hw/ppc/e500: Move clock and TB frequency to machine class 2025-06-10 12:59:09 +02:00
pef.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pegasos2.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_adu.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_bmc.c ppc/pnv: Move the PNOR LPC address into struct PnvPnor 2025-03-20 19:58:10 +10:00
pnv_chiptod.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_core.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_homer.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_i2c.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_lpc.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_n1_chiplet.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_nest_pervasive.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_occ.c hw/ppc/pnv_occ: skip automatic zero-init of large struct 2025-06-12 13:40:16 -04:00
pnv_pnor.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_psi.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pnv_sbe.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pnv_xscom.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
pnv.c hw/ppc: Fix build error with CONFIG_POWERNV disabled 2025-09-04 23:17:16 +03:00
ppc4xx_devs.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ppc4xx_sdram.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ppc440_bamboo.c system/datadir: Add new type constant for DTB files 2025-04-25 17:09:58 +02:00
ppc440_uc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
ppc440.h ppc440: Remove ppc460ex_pcie_init legacy init function 2023-07-07 04:47:49 -03:00
ppc_booke.c exec/cpu-all: remove exec/target_page include 2025-04-23 15:04:57 -07:00
ppc.c exec/cpu-all: remove exec/cpu-interrupt include 2025-04-23 15:04:57 -07:00
ppce500_spin.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
prep_systemio.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
prep.c hw/pci-host/raven: Revert "raven: Move BIOS loading from board code to PCI host" 2025-06-10 11:06:46 +02:00
rs6000_mc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sam460ex.c system/datadir: Add new type constant for DTB files 2025-04-25 17:09:58 +02:00
spapr_caps.c include/system: Move exec/ram_addr.h to system/ram_addr.h 2025-04-23 14:08:24 -07:00
spapr_cpu_core.c qom: Constify TypeInfo::class_data 2025-04-25 17:00:41 +02:00
spapr_drc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_events.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_hcall.c Miscellaneous patches for 2025-04-24 2025-04-24 13:44:57 -04:00
spapr_iommu.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_irq.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_nested.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
spapr_numa.c spapr: Remove support for NVIDIA V100 GPU with NVLink2 2023-09-18 07:25:28 -03:00
spapr_nvdimm.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_ovec.c exec/cpu-all: remove system/memory include 2025-04-23 15:04:57 -07:00
spapr_pci_vfio.c vfio: Move VFIOAddressSpace helpers into container-base.c 2025-04-25 09:01:37 +02:00
spapr_pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
spapr_rng.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_rtas_ddw.c spapr/ddw: Implement 64bit query extension 2022-07-06 10:22:37 -03:00
spapr_rtas.c ppc/spapr: Fix RTAS stopped state 2025-03-20 14:48:17 +10:00
spapr_rtc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_tpm_proxy.c hw/ppc/spapr_tpm_proxy: skip automatic zero-init of large arrays 2025-06-12 13:40:16 -04:00
spapr_vhyp_mmu.c target/ppc: Unexport some functions from mmu-book3s-v3.h 2024-07-26 09:51:34 +10:00
spapr_vio.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_vof.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr.c ppc/xive: Change presenter .match_nvt to match not present 2025-07-21 08:03:52 +02:00
trace-events ppc/pnv: Begin a more complete ADU LPC model for POWER9/10 2024-07-26 09:21:06 +10:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtex_ml507.c system/datadir: Add new type constant for DTB files 2025-04-25 17:09:58 +02:00
vof.c include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00