From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH v4 13/17] xen/arm: ITS: Initialize physical ITS Date: Mon, 13 Jul 2015 18:06:40 +0100 Message-ID: References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-14-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: <1436514172-3263-14-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: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , tim@xen.org, xen-devel@lists.xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On Fri, 10 Jul 2015, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > Initialize physical ITS driver from GIC v3 driver > if LPIs are supported by hardware > > Signed-off-by: Vijaya Kumar K > --- > xen/arch/arm/gic-v3.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c > index 53554e6..f4881d7 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -694,6 +694,10 @@ static int __cpuinit gicv3_cpu_init(void) > if ( gicv3_enable_redist() ) > return -ENODEV; > > + /* Give LPIs a spin */ > + if ( gicv3_info.lpi_supported ) > + its_cpu_init(); I see that actually is the other way around compared to what I previously suggested. That is OK if we can count on the fact that if lpis are supported by the gic, the presence of an its is guaranteed, but I am not sure that is the case. Otherwise we also need to check that an its is actually present. > /* Set priority on PPI and SGI interrupts */ > priority = (GIC_PRI_IPI << 24 | GIC_PRI_IPI << 16 | GIC_PRI_IPI << 8 | > GIC_PRI_IPI); > @@ -1312,6 +1316,9 @@ static int __init gicv3_init(void) > else > gicv3_info.lpi_supported = 0; > > + if ( gicv3_info.lpi_supported ) > + its_init(&gicv3.rdist_data); > + > gicv3_dist_init(); > res = gicv3_cpu_init(); > gicv3_hyp_init(); > -- > 1.7.9.5 >