aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-01-06 15:56:43 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-01-08 11:01:59 +1100
commit806fed593d0ed88d2f11e45cc54612daec98fe27 (patch)
tree21ce7fcef2c48641b2728508c3943368329186cd /hw/intc
parent74e51a38f74537d7260f0d45fb01e675f1558163 (diff)
pnv/xive: Deduce the PnvXive pointer from XiveTCTX::xptr
And use it instead of reaching out to the machine. This allows to get rid of pnv_get_chip(). Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20200106145645.4539-11-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/pnv_xive.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
index 6412cf222e..715fca61ae 100644
--- a/hw/intc/pnv_xive.c
+++ b/hw/intc/pnv_xive.c
@@ -472,12 +472,8 @@ static uint8_t pnv_xive_get_block_id(XiveRouter *xrtr)
static PnvXive *pnv_xive_tm_get_xive(PowerPCCPU *cpu)
{
int pir = ppc_cpu_pir(cpu);
- PnvChip *chip;
- PnvXive *xive;
-
- chip = pnv_get_chip(PNV9_PIR2CHIP(pir));
- assert(chip);
- xive = &PNV9_CHIP(chip)->xive;
+ XivePresenter *xptr = XIVE_TCTX(pnv_cpu_state(cpu)->intc)->xptr;
+ PnvXive *xive = PNV_XIVE(xptr);
if (!pnv_xive_is_cpu_enabled(xive, cpu)) {
xive_error(xive, "IC: CPU %x is not enabled", pir);