[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_server_number() routine |
Date: |
Fri, 7 Dec 2018 15:07:42 +1100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Dec 06, 2018 at 12:22:29AM +0100, Cédric Le Goater wrote:
> 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>
Again, this makes sense on its own, so I've applied.
> ---
> include/hw/ppc/spapr.h | 1 +
> hw/ppc/spapr.c | 8 ++++----
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> index 6279711fe8f7..198764066dc9 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);
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index e470efe7993c..a689f853e020 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);
> @@ -1270,7 +1270,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) {
> @@ -2469,7 +2469,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.
> */
> @@ -2589,7 +2589,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);
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v6 09/37] ppc/xive: notify the CPU when the interrupt priority is more privileged, (continued)
- [Qemu-devel] [PATCH v6 09/37] ppc/xive: notify the CPU when the interrupt priority is more privileged, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 10/37] spapr/xive: introduce a XIVE interrupt controller, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 13/37] spapr: introduce a spapr_irq_init() routine, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 11/37] spapr/xive: use the VCPU id as a NVT identifier, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 14/37] spapr: modify the irq backend 'init' method, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_server_number() routine, Cédric Le Goater, 2018/12/05
- Re: [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_server_number() routine,
David Gibson <=
- [Qemu-devel] [PATCH v6 12/37] spapr: initialize VSMT before initializing the IRQ backend, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 16/37] spapr: introdude a new machine IRQ backend for XIVE, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 18/37] spapr: add device tree support for the XIVE exploitation mode, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 19/37] spapr: allocate the interrupt thread context under the CPU core, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 20/37] spapr: extend the sPAPR IRQ backend for XICS migration, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 17/37] spapr: add hcalls support for the XIVE exploitation interrupt mode, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 21/37] spapr: add a 'reset' method to the sPAPR IRQ backend, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 22/37] spapr: add a 'pseries-3.1-xive' machine type, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 23/37] linux-headers: update to 4.20-rc5, Cédric Le Goater, 2018/12/05