qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 03/16] intc/arm_gic: Extract public header hw


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 03/16] intc/arm_gic: Extract public header hw/intc/arm_gic.h
Date: Thu, 25 Jul 2013 16:40:11 +0100

On 23 July 2013 03:43, Andreas Färber <address@hidden> wrote:
> +typedef struct GICState {
> +    /*< private >*/
> +    SysBusDevice busdev;
> +    /*< public >*/
> +
> +    qemu_irq parent_irq[GIC_NCPU];
> +    bool enabled;
> +    bool cpu_enabled[GIC_NCPU];
> +
[etc]

Am I missing some reason why all these fields should be
in the section marked '< public >' ? I would have expected
that they would all be considered private, because only
the GIC implementation (and its subclasses) should be
touching them.

> +    MemoryRegion iomem; /* Distributor */
> +    /* This is just so we can have an opaque pointer which identifies
> +     * both this GIC and which CPU interface we should be accessing.
> +     */
> +    struct GICState *backref[GIC_NCPU];
> +    MemoryRegion cpuiomem[GIC_NCPU + 1]; /* CPU interfaces */
> +    uint32_t num_irq;
> +    uint32_t revision;

...when we get down to here, should properties be
considered 'private' (ie "don't touch except via the
property APIs") or are they 'public' ?

> +} GICState;

(I noticed this because I thought I'd use these
patches as my demonstrator for the __private macro
I suggested in the other thread.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]