[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/25] ppc/xics: assign of the CPU 'intc' pointe
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 02/25] ppc/xics: assign of the CPU 'intc' pointer under the core |
Date: |
Fri, 24 Nov 2017 13:57:51 +1100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Thu, Nov 23, 2017 at 02:29:32PM +0100, Cédric Le Goater wrote:
> The 'intc' pointer of the CPU references the interrupt presenter in
> the XICS interrupt mode. When the XIVE interrupt mode is available and
> activated, the machine will need to reassign this pointer to reflect
> the change.
>
> Moving this assignment under the realize routine of the CPU will ease
> the process when the interrupt mode is toggled.
>
> Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/intc/xics.c | 1 -
> hw/ppc/pnv_core.c | 2 +-
> hw/ppc/spapr_cpu_core.c | 2 +-
> 3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index e4ccdff8f577..0f2e7273bc8f 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -334,7 +334,6 @@ static void icp_realize(DeviceState *dev, Error **errp)
> }
>
> cpu = POWERPC_CPU(obj);
> - cpu->intc = OBJECT(icp);
> icp->cs = CPU(obj);
>
> env = &cpu->env;
> diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
> index a066736846f8..90acaac45889 100644
> --- a/hw/ppc/pnv_core.c
> +++ b/hw/ppc/pnv_core.c
> @@ -133,7 +133,7 @@ static void pnv_core_realize_child(Object *child,
> XICSFabric *xi, Error **errp)
> return;
> }
>
> - icp_create(cs, TYPE_PNV_ICP, xi, &local_err);
> + cpu->intc = icp_create(cs, TYPE_PNV_ICP, xi, &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> return;
> diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> index f8a520a2fa2d..f7cc74512481 100644
> --- a/hw/ppc/spapr_cpu_core.c
> +++ b/hw/ppc/spapr_cpu_core.c
> @@ -122,7 +122,7 @@ static void spapr_cpu_core_realize_child(Object *child,
> goto error;
> }
>
> - icp_create(cs, spapr->icp_type, XICS_FABRIC(spapr), &local_err);
> + cpu->intc = icp_create(cs, spapr->icp_type, XICS_FABRIC(spapr),
> &local_err);
> if (local_err) {
> goto error;
> }
--
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 04/25] spapr: move the IRQ allocation routines under the machine, Cédric Le Goater, 2017/11/23
[Qemu-devel] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper, Cédric Le Goater, 2017/11/23