From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs Date: Sat, 11 Jul 2015 20:08:46 +0200 Message-ID: <55A15BAE.6060100@citrix.com> References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-6-git-send-email-vijay.kilari@gmail.com> <1436535998.10074.29.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 , Ian Campbell Cc: Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org Hi Vijay, On 11/07/2015 16:40, Vijay Kilari wrote: >>> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h >>> index e9d5f36..44c2317 100644 >>> --- a/xen/include/asm-arm/gic.h >>> +++ b/xen/include/asm-arm/gic.h >>> @@ -20,6 +20,9 @@ >>> >>> #define NR_GIC_LOCAL_IRQS NR_LOCAL_IRQS >>> #define NR_GIC_SGI 16 >>> +#define FIRST_GIC_LPI 8192 >>> +#define NR_GIC_LPI 4096 >>> +#define MAX_LPI (FIRST_GIC_LPI + NR_GIC_LPI) >> >> MAX_LPI and NR_GIC_LPI should be obtained from the hardware at init time >> and put somewhere, like a global nr_lpis perhaps, to be used throughout. > > This MAX_LPI and NR_GIC_LPI is Xen limitation where in we > are allocating irq_descriptors statically upto NR_GIC_LPI. Why? The design doc [1] suggested to allocate dynamically the irq_desc array for LPI at boot. Using a static array will grow up the Xen binary by close to 4096 LPIs * 60 bytes (rough estimate) = 240 KB. And this is for any AArch64 platform, no matter that ITS is in used or not. Regards, [1] http://xenbits.xen.org/people/ianc/vits/draftG.html#irq-descriptors -- Julien Grall