[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 2/5] ppc/xics: move the instance_init handler u
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH v2 2/5] ppc/xics: move the instance_init handler under the ics-base class |
Date: |
Tue, 26 Jun 2018 12:21:29 +1000 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Mon, Jun 25, 2018 at 11:17:15AM +0200, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
> hw/intc/xics.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Applied, thanks.
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index d6066d561fdc..83340770f7c0 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -611,13 +611,6 @@ static const VMStateDescription vmstate_ics_simple = {
> },
> };
>
> -static void ics_simple_initfn(Object *obj)
> -{
> - ICSState *ics = ICS_SIMPLE(obj);
> -
> - ics->offset = XICS_IRQ_BASE;
> -}
> -
> static void ics_simple_realize(DeviceState *dev, Error **errp)
> {
> ICSState *ics = ICS_SIMPLE(dev);
> @@ -655,7 +648,6 @@ static const TypeInfo ics_simple_info = {
> .instance_size = sizeof(ICSState),
> .class_init = ics_simple_class_init,
> .class_size = sizeof(ICSStateClass),
> - .instance_init = ics_simple_initfn,
> };
>
> static void ics_base_realize(DeviceState *dev, Error **errp)
> @@ -679,6 +671,13 @@ static void ics_base_realize(DeviceState *dev, Error
> **errp)
> ics->irqs = g_malloc0(ics->nr_irqs * sizeof(ICSIRQState));
> }
>
> +static void ics_base_instance_init(Object *obj)
> +{
> + ICSState *ics = ICS_BASE(obj);
> +
> + ics->offset = XICS_IRQ_BASE;
> +}
> +
> static Property ics_base_properties[] = {
> DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0),
> DEFINE_PROP_END_OF_LIST(),
> @@ -697,6 +696,7 @@ static const TypeInfo ics_base_info = {
> .parent = TYPE_DEVICE,
> .abstract = true,
> .instance_size = sizeof(ICSState),
> + .instance_init = ics_base_instance_init,
> .class_init = ics_base_class_init,
> .class_size = sizeof(ICSStateClass),
> };
--
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-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree, Cédric Le Goater, 2018/06/25
- [Qemu-ppc] [PATCH v2 1/5] ppc/xics: introduce a parent_realize in ICSStateClass, Cédric Le Goater, 2018/06/25
- [Qemu-ppc] [PATCH v2 2/5] ppc/xics: move the instance_init handler under the ics-base class, Cédric Le Goater, 2018/06/25
- Re: [Qemu-ppc] [PATCH v2 2/5] ppc/xics: move the instance_init handler under the ics-base class,
David Gibson <=
- [Qemu-ppc] [PATCH v2 3/5] ppx/xics: introduce a parent_reset in ICSStateClass, Cédric Le Goater, 2018/06/25
- [Qemu-ppc] [PATCH v2 4/5] ppc/xics: move the vmstate structures under the ics-base class, Cédric Le Goater, 2018/06/25
- [Qemu-ppc] [PATCH v2 5/5] ppc/xics: rework the ICS classes inheritance tree, Cédric Le Goater, 2018/06/25
- Re: [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree, Greg Kurz, 2018/06/26