On Tue, Jul 25, 2017 at 08:01:38PM +0200, Greg Kurz wrote:
> With the addition of PHB hotplug, we have a static number of DRCs
> that can be used to handle hotplug/unplug operations on our PHBs,
> and need a consistent way to map PHBs to these connectors, and
> assign a unique identifiers for the connectors.
>
> This patch adds a drc_id property for that purpose.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
I'd prefer to see this folded into the patch that actually uses this
property.
> ---
> hw/ppc/spapr_pci.c | 1 +
> include/hw/pci-host/spapr.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 994d2f36105f..54533d8a3841 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -1878,6 +1878,7 @@ static Property spapr_phb_properties[] = {
> pre_2_8_migration, false),
> DEFINE_PROP_BOOL("pcie-extended-configuration-space", sPAPRPHBState,
> pcie_ecs, true),
> + DEFINE_PROP_UINT32("drc_id", sPAPRPHBState, drc_id, -1),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
> index 5a4e9686d562..31bae68167f2 100644
> --- a/include/hw/pci-host/spapr.h
> +++ b/include/hw/pci-host/spapr.h
> @@ -82,6 +82,8 @@ struct sPAPRPHBState {
>
> bool pcie_ecs; /* Allow access to PCIe extended config space? */
>
> + uint32_t drc_id;
> +
> /* Fields for migration compatibility hacks */
> bool pre_2_8_migration;
> uint32_t mig_liobn;
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson