summaryrefslogtreecommitdiff
path: root/hw/intc/spapr_xive_kvm.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-08-13 19:28:10 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-08-14 13:35:45 +1000
commit3110f0ee19ccdb50adff3dfa1321039f69efddcd (patch)
tree88f66cb2f4c740c31762eb4f38bb1c4c3ca16943 /hw/intc/spapr_xive_kvm.c
parent37035df51eaabb8d26b71da75b88a1c6727de8fa (diff)
downloadqemu-3110f0ee19ccdb50adff3dfa1321039f69efddcd.zip
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_kvm.c')
-rw-r--r--hw/intc/spapr_xive_kvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c
index d871bb1a00..e8667ce5f6 100644
--- a/hw/intc/spapr_xive_kvm.c
+++ b/hw/intc/spapr_xive_kvm.c
@@ -831,7 +831,7 @@ void kvmppc_xive_disconnect(SpaprInterruptController *intc)
/* Clear the KVM mapping */
xsrc = &xive->source;
- esb_len = (1ull << xsrc->esb_shift) * xsrc->nr_irqs;
+ esb_len = xive_source_esb_len(xsrc);
if (xsrc->esb_mmap) {
memory_region_del_subregion(&xsrc->esb_mmio, &xsrc->esb_mmio_kvm);