From: Stefano Stabellini Subject: Re: [RFC PATCH v1 03/10] xen/arm: move vgic data to vgic driver Date: Thu, 20 Mar 2014 18:11:47 +0000 Message-ID: References: <1395238631-2024-1-git-send-email-vijay.kilari@gmail.com> <1395238631-2024-4-git-send-email-vijay.kilari@gmail.com> <532B2BE6.6020206@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <532B2BE6.6020206@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Ian.Campbell@citrix.com, vijay.kilari@gmail.com, Stefano Stabellini , Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 20 Mar 2014, Julien Grall wrote: > On 03/20/2014 05:14 PM, Stefano Stabellini wrote: > > On Wed, 19 Mar 2014, vijay.kilari@gmail.com wrote: > >> @@ -142,7 +133,7 @@ struct arch_domain > >> spinlock_t lock; > >> int ctlr; > >> int nr_lines; /* Number of SPIs */ > >> - struct vgic_irq_rank *shared_irqs; > >> + void *shared_irqs; > > > > I would prefer to avoid void* fields. Either we introduce a > > vgic_irq_rank union that can be v2 or v3, or we could have a single > > opaque void* pointer that each vgic implementation can use for whatever > > they like. I think that the union is probably better because it would > > let us avoid quite a few casts in the code. > > > > Most of the cast can be removed without this trick :). > > IHMO, void * might better to avoid expanding the domain/VCPU structure. > We are already close to the 1 page size. A pointer is fine, that is not an issue. However we should try to avoid the usage of void* as a way to avoid type checking at compile time.