From nobody Sun Nov 9 16:04:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551158263157467.4466162130583; Mon, 25 Feb 2019 21:17:43 -0800 (PST) Received: from localhost ([127.0.0.1]:49129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyV7c-0006BY-10 for importer@patchew.org; Tue, 26 Feb 2019 00:17:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyUlQ-0005Zw-B6 for qemu-devel@nongnu.org; Mon, 25 Feb 2019 23:54:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyUlP-00030h-MH for qemu-devel@nongnu.org; Mon, 25 Feb 2019 23:54:44 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:50289) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyUlP-0002yY-7C; Mon, 25 Feb 2019 23:54:43 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 447mfQ4LYSz9sPC; Tue, 26 Feb 2019 15:53:16 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1551156798; bh=A0+jLvaVqjQ6aGWJQDNE/G8kl2hgL0Z+V9rsO3KH0qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f5Ao1p/eqdcqQ5L23JpSiypQilPbr2aY+J+X4F6IXOraZVgLTXphT0q/bBOFB8gzt Zn6q7+NKu0J4pPDMB8h4m8pixE9Qekor47+mYYBRkBzm+PJpseNy7vpRIjhLEtr3Y0 dB+WoEVzwZU4CLXq/t+YtnmkwLNb8PgCcVf6Jsi4= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 26 Feb 2019 15:52:56 +1100 Message-Id: <20190226045304.25618-43-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226045304.25618-1-david@gibson.dropbear.id.au> References: <20190226045304.25618-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 42/50] spapr_pci: add ibm, my-drc-index property for PHB hotplug X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, gkurz@kaod.org, Michael Roth , qemu-devel@nongnu.org, Greg Kurz , qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Michael Roth This is needed to denote a boot-time PHB as being hot-pluggable. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: Greg Kurz Message-Id: <155059672420.1466090.15147504040270659866.stgit@bahia.lab.toul= ouse-stg.fr.ibm.com> Signed-off-by: David Gibson --- hw/ppc/spapr_pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index a0e1769439..03fc26985a 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2203,6 +2203,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, uint32_= t intc_phandle, void *fdt, sPAPRTCETable *tcet; PCIBus *bus =3D PCI_HOST_BRIDGE(phb)->bus; sPAPRFDT s_fdt; + sPAPRDRConnector *drc; =20 /* Start populating the FDT */ nodename =3D g_strdup_printf("pci@%" PRIx64, phb->buid); @@ -2269,6 +2270,14 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, uint32= _t intc_phandle, void *fdt, tcet->liobn, tcet->bus_offset, tcet->nb_table << tcet->page_shift); =20 + drc =3D spapr_drc_by_id(TYPE_SPAPR_DRC_PHB, phb->index); + if (drc) { + uint32_t drc_index =3D cpu_to_be32(spapr_drc_index(drc)); + + _FDT(fdt_setprop(fdt, bus_off, "ibm,my-drc-index", &drc_index, + sizeof(drc_index))); + } + /* Walk the bridges and program the bus numbers*/ spapr_phb_pci_enumerate(phb); _FDT(fdt_setprop_cell(fdt, bus_off, "qemu,phb-enumerated", 0x1)); --=20 2.20.1