qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Fan Ni <fan.ni@samsung.com>,
	linuxarm@huawei.com
Subject: Re: [PATCH 2/2] hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEV
Date: Fri, 21 Apr 2023 16:46:53 +0200	[thread overview]
Message-ID: <200b0bf4-2396-bdd9-ba8b-7efa5c9997fe@redhat.com> (raw)
In-Reply-To: <20230420142750.6950-3-Jonathan.Cameron@huawei.com>

On 20/04/2023 16.27, Jonathan Cameron via wrote:
> Previously, PXB_CXL_DEVICE, PXB_PCIE_DEVICE and PXB_DEVICE all
> have PCI_DEVICE as their direct parent but share a common state
> struct PXBDev. convert_to_pxb() is used to get the PXBDev
> instance from which ever of these types it is called on.
> 
> This patch switches to an explicit heirarchy based on shared
> functionality.  To allow use of OBJECT_DECLARE_SIMPLE_TYPE()
> whilst minimizing code changes, all types are renamed to have
> the postfix _DEV rather than _DEVICE.  The new heirarchy

s/heirarchy/hierarchy/

> has PXB_CXL_DEV with parent PXB_PCIE_DEV which in turn
> has parent PXB_DEV which continues to have parent PCI_DEVICE.
> 
> This allows simple use of PXB_DEV() etc rather than a custom function
> + removal of duplicated properties and moving the CXL specific
> elements out of struct PXBDev.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>   hw/acpi/cxl.c                       | 11 +++---
>   hw/cxl/cxl-host.c                   |  4 +-
>   hw/pci-bridge/pci_expander_bridge.c | 59 ++++++++++-------------------
>   include/hw/cxl/cxl.h                |  4 +-
>   include/hw/pci/pci_bridge.h         | 28 ++++++++++----
>   5 files changed, 49 insertions(+), 57 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2023-04-21 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 14:27 [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance Jonathan Cameron via
2023-04-20 14:27 ` [PATCH 1/2] hw/pci-bridge: pci_expander_bridge fix type in pxb_cxl_dev_reset() Jonathan Cameron via
2023-04-21 14:03   ` Thomas Huth
2023-04-21 14:24   ` Peter Maydell
2023-04-20 14:27 ` [PATCH 2/2] hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEV Jonathan Cameron via
2023-04-21 14:46   ` Thomas Huth [this message]
2023-04-21  8:19 ` [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance Michael S. Tsirkin
2023-04-21  8:59   ` Peter Maydell
2023-04-21 12:19     ` Jonathan Cameron via
2023-04-21 12:45       ` Thomas Huth
2023-04-22 10:02       ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200b0bf4-2396-bdd9-ba8b-7efa5c9997fe@redhat.com \
    --to=thuth@redhat.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=fan.ni@samsung.com \
    --cc=linuxarm@huawei.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).