[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper |
Date: |
Fri, 24 Nov 2017 14:16:59 +1100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Thu, Nov 23, 2017 at 02:29:35PM +0100, Cédric Le Goater wrote:
> It will make synchronisation easier with the XIVE interrupt mode when
> available. The 'irq' parameter refers to the global IRQ number space.
>
> Signed-off-by: Cédric Le Goater <address@hidden>
s/spapr_irq_set/spapr_irq_set_lsi/
otherwise the name doesn't tell you what it sets.
With that change,
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 7ae84d40bdb4..79f38a9ff4e1 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3594,6 +3594,11 @@ static int ics_find_free_block(ICSState *ics, int num,
> int alignnum)
> return -1;
> }
>
> +static void spapr_irq_set(sPAPRMachineState *spapr, int irq, bool lsi)
> +{
> + ics_set_irq_type(spapr->ics, irq - spapr->ics->offset, lsi);
> +}
> +
> int spapr_irq_alloc(sPAPRMachineState *spapr, int irq_hint, bool lsi,
> Error **errp)
> {
> @@ -3618,7 +3623,7 @@ int spapr_irq_alloc(sPAPRMachineState *spapr, int
> irq_hint, bool lsi,
> irq += ics->offset;
> }
>
> - ics_set_irq_type(ics, irq - ics->offset, lsi);
> + spapr_irq_set(spapr, irq, lsi);
> trace_spapr_irq_alloc(irq);
>
> return irq;
> @@ -3657,10 +3662,10 @@ int spapr_irq_alloc_block(sPAPRMachineState *spapr,
> int num, bool lsi,
> return -1;
> }
>
> + first += ics->offset;
> for (i = first; i < first + num; ++i) {
> - ics_set_irq_type(ics, i, lsi);
> + spapr_irq_set(spapr, i, lsi);
> }
> - first += ics->offset;
>
> trace_spapr_irq_alloc_block(first, num, lsi, align);
>
--
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
- Re: [Qemu-ppc] [PATCH 02/25] ppc/xics: assign of the CPU 'intc' pointer under the core, (continued)
- [Qemu-ppc] [PATCH 04/25] spapr: move the IRQ allocation routines under the machine, Cédric Le Goater, 2017/11/23
- [Qemu-ppc] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper, Cédric Le Goater, 2017/11/23
- Re: [Qemu-ppc] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper,
David Gibson <=
- [Qemu-ppc] [PATCH 06/25] spapr: introduce a spapr_irq_get_qirq() helper, Cédric Le Goater, 2017/11/23
- [Qemu-ppc] [PATCH 07/25] migration: add VMSTATE_STRUCT_VARRAY_UINT32_ALLOC, Cédric Le Goater, 2017/11/23
- [Qemu-ppc] [PATCH 08/25] spapr: introduce a skeleton for the XIVE interrupt controller, Cédric Le Goater, 2017/11/23
- Re: [Qemu-ppc] [PATCH 08/25] spapr: introduce a skeleton for the XIVE interrupt controller, Greg Kurz, 2017/11/29