From 806fed593d0ed88d2f11e45cc54612daec98fe27 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Mon, 6 Jan 2020 15:56:43 +0100 Subject: pnv/xive: Deduce the PnvXive pointer from XiveTCTX::xptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And use it instead of reaching out to the machine. This allows to get rid of pnv_get_chip(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater Message-Id: <20200106145645.4539-11-clg@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'hw/ppc') diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 19fc5d4..e2735bb 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1717,20 +1717,6 @@ static int pnv_match_nvt(XiveFabric *xfb, uint8_t format, return total_count; } -PnvChip *pnv_get_chip(uint32_t chip_id) -{ - PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine()); - int i; - - for (i = 0; i < pnv->num_chips; i++) { - PnvChip *chip = pnv->chips[i]; - if (chip->chip_id == chip_id) { - return chip; - } - } - return NULL; -} - static void pnv_machine_power8_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); -- cgit v1.1