qemu-e2k/include/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.h hw/pci-host/bonito: Declare TYPE_BONITO_PCI_HOST_BRIDGE in header 2023-01-13 16:22:57 +01:00
designware.h include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h 2023-01-08 01:54:22 -05:00
dino.h dino: move from hw/hppa to hw/pci-host 2022-05-08 18:52:36 +01:00
gpex.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
grackle.h hw/ppc/mac.h: Move grackle-pcihost type declaration out to a header 2022-10-31 18:48:23 +00:00
i440fx.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
ls7a.h include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h 2023-01-08 01:54:22 -05:00
mv64361.h
pam.h
pnv_phb3_regs.h ppc: Define SETFIELD for the ppc target 2022-07-06 10:22:38 -03:00
pnv_phb3.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
pnv_phb4_regs.h ppc/pnv: Add support for PHB5 "Address-based trigger" mode 2022-03-02 06:51:39 +01:00
pnv_phb4.h pnv_phb4_pec: Simplify/align code to parent user-created PHBs 2023-03-03 16:50:17 -03:00
ppce500.h
q35.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
remote.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
sabre.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
spapr.h
uninorth.h
xilinx-pcie.h include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h 2023-01-08 01:54:22 -05:00