diff options
author | Greg Kurz <groug@kaod.org> | 2020-08-13 19:28:10 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-08-14 13:35:45 +1000 |
commit | 3110f0ee19ccdb50adff3dfa1321039f69efddcd (patch) | |
tree | 88f66cb2f4c740c31762eb4f38bb1c4c3ca16943 /hw/intc/spapr_xive.c | |
parent | 37035df51eaabb8d26b71da75b88a1c6727de8fa (diff) |
spapr/xive: Use xive_source_esb_len()
static inline size_t xive_source_esb_len(XiveSource *xsrc)
{
return (1ull << xsrc->esb_shift) * xsrc->nr_irqs;
}
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159733969034.320580.6571451425779179477.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/spapr_xive.c')
-rw-r--r-- | hw/intc/spapr_xive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 3c84f64dc4..4bd0d606ba 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -336,7 +336,7 @@ static void spapr_xive_realize(DeviceState *dev, Error **errp) sysbus_init_mmio(SYS_BUS_DEVICE(xive), &end_xsrc->esb_mmio); /* Set the mapping address of the END ESB pages after the source ESBs */ - xive->end_base = xive->vc_base + (1ull << xsrc->esb_shift) * xsrc->nr_irqs; + xive->end_base = xive->vc_base + xive_source_esb_len(xsrc); /* * Allocate the routing tables |