hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance.
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/pci-bridge: pci_expander_bridge fix type in pxb_cxl_dev_reset()hw/ | +1 | 2 replies | |
| 2/2 | hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEVhw/ hw/ hw/ +2 more | +49 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Huth |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance.
Peter Maydell highlighted an incorrect conversion to TYPE_PXB_DEVICE from a device that didn't have that a an ancestor type. PXB_DEV() used instead of PXB_CXL_DEV()/
During the discussion it became clear that the inheritance of the various TYPE_PXB*_DEVICE was unusual. This patchset first provides the minimal fix then cleans up the inheritance of types based on functionality.
There is also a rename to TYPE_PXB*_DEV to allow removal of some boilerplate.
Before this seriesTYPE_PXB_DEVICE, TYPE_PXB_PCIE_DEVICE and TYPE_PXB_CXL_DEVICE all had TYPE_PCI_DEVICE as their direct parent though they shared a common struct PXBDev for their state. As a result this state contained some data that was irrelevant for some the types.
This series changes toTYPE_PXB_CXL_DEV has a parent of TYPE_PXB_PCIE_DEV TYPE_PXB_PCIE_DEV has a parent of TYPE_PXB_DEV TYPE_PXB_DEV continues to have a parent of TYPE_PCI_DEVICE.
Each of the TYPE_PXB*_DEV has a state structure adding those elements to their parent that they need. This also allowed dropping a wrapping structure for the CXL state as the PXBCXLDev structure already provides the equivalent grouping.
Patches are similar to those posted in the thread but rebased on v8.0.0.
Jonathan Cameron (2):
hw/pci-bridge: pci_expander_bridge fix type in pxb_cxl_dev_reset() hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEV
hw/acpi/cxl.c | 11 +++--- hw/cxl/cxl-host.c | 4 +- hw/pci-bridge/pci_expander_bridge.c | 61 ++++++++++------------------- include/hw/cxl/cxl.h | 4 +- include/hw/pci/pci_bridge.h | 28 +++++++++---- 5 files changed, 50 insertions(+), 58 deletions(-)
Signature · 1 line
2.37.2