[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/27] spapr: export and rename the xics_max_server_n
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 20/27] spapr: export and rename the xics_max_server_number() routine |
Date: |
Thu, 13 Dec 2018 15:01:19 +1100 |
From: Cédric Le Goater <address@hidden>
The XIVE sPAPR IRQ backend will use it to define the number of ENDs of
the IC controller.
Signed-off-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 8 ++++----
include/hw/ppc/spapr.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 625f467c3e..0293a23739 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -150,7 +150,7 @@ static void pre_2_10_vmstate_unregister_dummy_icp(int i)
(void *)(uintptr_t) i);
}
-static int xics_max_server_number(sPAPRMachineState *spapr)
+int spapr_max_server_number(sPAPRMachineState *spapr)
{
assert(spapr->vsmt);
return DIV_ROUND_UP(max_cpus * spapr->vsmt, smp_threads);
@@ -1268,7 +1268,7 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
_FDT(fdt_setprop_cell(fdt, 0, "#size-cells", 2));
/* /interrupt controller */
- spapr_dt_xics(xics_max_server_number(spapr), fdt, PHANDLE_XICP);
+ spapr_dt_xics(spapr_max_server_number(spapr), fdt, PHANDLE_XICP);
ret = spapr_populate_memory(spapr, fdt);
if (ret < 0) {
@@ -2467,7 +2467,7 @@ static void spapr_init_cpus(sPAPRMachineState *spapr)
if (smc->pre_2_10_has_unused_icps) {
int i;
- for (i = 0; i < xics_max_server_number(spapr); i++) {
+ for (i = 0; i < spapr_max_server_number(spapr); i++) {
/* Dummy entries get deregistered when real ICPState objects
* are registered during CPU core hotplug.
*/
@@ -2587,7 +2587,7 @@ static void spapr_machine_init(MachineState *machine)
load_limit = MIN(spapr->rma_size, RTAS_MAX_ADDR) - FW_OVERHEAD;
/* VSMT must be set in order to be able to compute VCPU ids, ie to
- * call xics_max_server_number() or spapr_vcpu_id().
+ * call spapr_max_server_number() or spapr_vcpu_id().
*/
spapr_set_vsmt_mode(spapr, &error_fatal);
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 6279711fe8..198764066d 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -737,6 +737,7 @@ int spapr_hpt_shift_for_ramsize(uint64_t ramsize);
void spapr_reallocate_hpt(sPAPRMachineState *spapr, int shift,
Error **errp);
void spapr_clear_pending_events(sPAPRMachineState *spapr);
+int spapr_max_server_number(sPAPRMachineState *spapr);
/* CPU and LMB DRC release callbacks. */
void spapr_core_release(DeviceState *dev);
--
2.19.2
- [Qemu-devel] [PULL 19/27] spapr: introduce a spapr_irq_init() routine, (continued)
- [Qemu-devel] [PULL 19/27] spapr: introduce a spapr_irq_init() routine, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 15/27] ppc/xive: introduce the XiveNotifier interface, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 16/27] ppc/xive: introduce the XiveRouter model, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 17/27] ppc/xive: introduce the XIVE Event Notification Descriptors, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 18/27] spapr: initialize VSMT before initializing the IRQ backend, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 14/27] ppc/xive: add support for the LSI interrupt sources, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 13/27] ppc/xive: introduce a XIVE interrupt source model, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 25/27] ppc/xive: notify the CPU when the interrupt priority is more privileged, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 23/27] ppc/xive: introduce the XIVE interrupt thread context, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 11/27] mac_newworld: simplify IRQ wiring, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 20/27] spapr: export and rename the xics_max_server_number() routine,
David Gibson <=
- [Qemu-devel] [PULL 21/27] Changes requirement for "vsubsbs" instruction, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 24/27] ppc/xive: introduce a simplified XIVE presenter, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 27/27] spapr/xive: use the VCPU id as a NVT identifier, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 26/27] spapr/xive: introduce a XIVE interrupt controller, David Gibson, 2018/12/12
- [Qemu-devel] [PULL 22/27] ppc/xive: add support for the END Event State Buffers, David Gibson, 2018/12/12
- Re: [Qemu-devel] [PULL 00/27] ppc-for-4.0 queue 20181213, no-reply, 2018/12/13
- Re: [Qemu-devel] [PULL 00/27] ppc-for-4.0 queue 20181213, Peter Maydell, 2018/12/14