[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/40] spapr/xive: Use xive_source_esb_len()
From: |
David Gibson |
Subject: |
[PULL 40/40] spapr/xive: Use xive_source_esb_len() |
Date: |
Tue, 18 Aug 2020 14:19:22 +1000 |
From: Greg Kurz <groug@kaod.org>
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>
---
hw/intc/spapr_xive.c | 2 +-
hw/intc/spapr_xive_kvm.c | 2 +-
2 files changed, 2 insertions(+), 2 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
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);
--
2.26.2
- [PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize(), (continued)
- [PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize(), David Gibson, 2020/08/18
- [PULL 30/40] spapr/xive: Rework error handling of kvmppc_xive_[gs]et_queue_config(), David Gibson, 2020/08/18
- [PULL 31/40] spapr/xive: Rework error handling in kvmppc_xive_get_queues(), David Gibson, 2020/08/18
- [PULL 39/40] nvram: Exit QEMU if NVRAM cannot contain all -prom-env data, David Gibson, 2020/08/18
- [PULL 33/40] spapr/kvm: Fix error handling in kvmppc_xive_pre_save(), David Gibson, 2020/08/18
- [PULL 36/40] spapr/xive: Simplify error handling in kvmppc_xive_connect(), David Gibson, 2020/08/18
- [PULL 38/40] spapr/xive: Simplify error handling of kvmppc_xive_cpu_synchronize_state(), David Gibson, 2020/08/18
- [PULL 32/40] spapr/xive: Rework error handling of kvmppc_xive_set_source_config(), David Gibson, 2020/08/18
- [PULL 35/40] ppc/xive: Fix error handling in vmstate_xive_tctx_*() callbacks, David Gibson, 2020/08/18
- [PULL 34/40] spapr/xive: Fix error handling in kvmppc_xive_post_load(), David Gibson, 2020/08/18
- [PULL 40/40] spapr/xive: Use xive_source_esb_len(),
David Gibson <=
- Re: [PULL 00/40] ppc-for-5.2 queue 20200818, Peter Maydell, 2020/08/23
- Re: [PULL 00/40] ppc-for-5.2 queue 20200818, Peter Maydell, 2020/08/24