From: Ian Campbell Subject: Re: [PATCH v5 14/21] xen/arm: calculate vgic irq rank based on register size Date: Tue, 17 Jun 2014 13:36:50 +0100 Message-ID: <1403008610.16844.87.camel@kazak.uk.xensource.com> References: <1402580192-13937-1-git-send-email-vijay.kilari@gmail.com> <1402580192-13937-15-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: <1402580192-13937-15-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, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-06-12 at 19:06 +0530, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > vGIC irq rank was computed assuming the register offset is byte > size.Use the HSR abort address size in calculating register size. > > So, with this patch following are acheived > (1) In the code 'dabt.size != number' this number is always > BYTE/HALF_WORD/WORD/DOUBLE defined by hsr registers. > Instead of checking for hard coded values use HSR abort > address size values. > (2) The vgic_irq_rank also depends on the same HSR defined > values to calculate irq rank. > > This make vgic_irq_rank generic as it takes register > size as parameter to calculate irq rank instead of hard coding to > value 2 in previous patches > > Also, output of REG_RANK_INDEX macro is module by 32 to make ITYM "modulo 32". > diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h > index 003c3e9..81e2740 100644 > --- a/xen/include/asm-arm/vgic.h > +++ b/xen/include/asm-arm/vgic.h > @@ -134,10 +134,10 @@ static inline void vgic_byte_write(uint32_t *reg, uint32_t var, int offset) > } > > /* > - * Offset of GICD_ with its rank, for GICD_ with > + * Offset of GICD_ with its rank, for GICD_ size s with Can you write for consistency please. With those two minor things fixed: Acked-by: Ian Campbell Ian.