From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 03/15] arm/xen: move gic save and restore registers to gic driver Date: Wed, 9 Apr 2014 17:51:20 +0100 Message-ID: <1397062280.6275.142.camel@kazak.uk.xensource.com> References: <1396612593-443-1-git-send-email-vijay.kilari@gmail.com> <1396612593-443-4-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396612593-443-4-git-send-email-vijay.kilari@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: vijay.kilari@gmail.com Cc: stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com, julien.grall@linaro.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2014-04-04 at 17:26 +0530, vijay.kilari@gmail.com wrote: > gic saved registers are moved to gic driver. > This required structure is allocated at runtime > and is saved & restored. I don't follow why this change required switch to allocating them dynamically. If it is a v2 vs v3 thing then I think a union in struct arch_vcpu would be fine, unless the v3 stuff is relatively enormous. > - v->arch.gic_apr = GICH[GICH_APR]; > - v->arch.gic_vmcr = GICH[GICH_VMCR]; > + v->arch.gic_state->gic_apr = GICH[GICH_APR]; > + v->arch.gic_state->gic_vmcr = GICH[GICH_VMCR]; I think the gic on the field name is now redundant, at I reckon you can drop _state too. IOW v->arch.gic->apr, v->arch.gic->vmcr, etc. (or v->arch.gic.v2.apr / v->arch.gic_v2.apr based on the first comment) Ian.