qemu-e2k/hw/pci-host
Frederic Barrat ddf0676f1a pnv_phb4_pec: Simplify/align code to parent user-created PHBs
When instantiating a user-created PHB on P9/P10, we don't really have
a reason any more to go through an indirection in pnv_chip_add_phb()
in pnv.c, we can go straight to the right function in
pnv_phb4_pec.c. That way, default PHBs and user-created PHBs are all
handled in the same file.  This patch also renames pnv_phb4_get_pec()
to pnv_pec_add_phb() to better reflect that it "hooks" a PHB to a PEC.

For P8, the PHBs are parented to the chip directly, so it makes sense
to keep calling pnv_chip_add_phb() in pnv.c, to also be consistent
with where default PHBs are handled. The only change here is that,
since that function is now only used for P8, we can refine the return
type.

So overall, the PnvPHB front-end now has a pnv_phb_user_get_parent()
function which handles the parenting of the user-created PHBs by
calling the right function in the right file based on the processor
version. It's also easily extensible if we ever need to support a
different parent object.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20230302163715.129635-5-fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03 16:50:17 -03:00
..
bonito.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
designware.c
dino.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
gpex-acpi.c
gpex.c
grackle.c hw/pci-host: Use register definitions from PCI standard 2023-01-27 11:47:02 -05:00
gt64120.c hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
i440fx.c hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init 2023-01-16 18:40:43 +01:00
Kconfig hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
meson.build hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
mv643xx.h
mv64361.c Do not include hw/hw.h if it is not necessary 2023-02-27 09:15:38 +01:00
pam.c
pnv_phb3_msi.c
pnv_phb3_pbcq.c
pnv_phb3.c include/hw/ppc: Split pnv_chip.h off pnv.h 2023-01-20 07:25:10 +01:00
pnv_phb4_pec.c pnv_phb4_pec: Simplify/align code to parent user-created PHBs 2023-03-03 16:50:17 -03:00
pnv_phb4.c ppc/pnv/pci: Fix PHB xscom registers memory region name 2023-02-05 06:40:28 -03:00
pnv_phb.c pnv_phb4_pec: Simplify/align code to parent user-created PHBs 2023-03-03 16:50:17 -03:00
pnv_phb.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
ppce500.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
q35.c hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init 2023-01-16 18:40:43 +01:00
raven.c hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
remote.c
sabre.c
sh_pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
trace-events hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
trace.h
uninorth.c hw/pci-host: Use register definitions from PCI standard 2023-01-27 11:47:02 -05:00
versatile.c hw/pci/pci: Factor out pci_bus_map_irqs() from pci_bus_irqs() 2023-01-13 16:22:57 +01:00
xen_igd_pt.c
xilinx-pcie.c