[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH 14/15] spapr_pci: add ibm, my-drc-index proper
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC PATCH 14/15] spapr_pci: add ibm, my-drc-index property for PHB hotplug |
Date: |
Tue, 5 May 2015 21:44:35 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Apr 29, 2015 at 02:20:23PM -0500, Michael Roth wrote:
> This is needed to denote a boot-time PHB as being hot-pluggable.
>
> Signed-off-by: Michael Roth <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr_pci.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 66fe85f..91dfd96 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -1572,6 +1572,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
> cpu_to_be32(b_ddddd(-1)|b_fff(0)), 0x0, 0x0, cpu_to_be32(-1)};
> uint32_t interrupt_map[PCI_SLOT_MAX * PCI_NUM_PINS][7];
> sPAPRTCETable *tcet;
> + sPAPRDRConnector *drc;
>
> /* Start populating the FDT */
> sprintf(nodename, "address@hidden" PRIx64, phb->buid);
> @@ -1624,6 +1625,15 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
> tcet->liobn, tcet->bus_offset,
> tcet->nb_table << tcet->page_shift);
>
> + drc = spapr_dr_connector_by_id(SPAPR_DR_CONNECTOR_TYPE_PHB, phb->index);
> + if (drc) {
> + sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
> + uint32_t drc_index = cpu_to_be32(drck->get_index(drc));
> +
> + _FDT(fdt_setprop(fdt, bus_off, "ibm,my-drc-index", &drc_index,
> + sizeof(drc_index)));
> + }
> +
> ret = spapr_drc_populate_dt(fdt, bus_off, OBJECT(phb),
> SPAPR_DR_CONNECTOR_TYPE_PCI);
> if (ret) {
--
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
pgpuW0ECK5gCW.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-ppc] [RFC PATCH 14/15] spapr_pci: add ibm, my-drc-index property for PHB hotplug,
David Gibson <=