From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v7 09/28] xen/arm: ITS: Introduce gic_is_lpi helper function Date: Tue, 22 Sep 2015 14:24:36 +0100 Message-ID: <56015694.1090000@citrix.com> References: <1442581755-2668-1-git-send-email-vijay.kilari@gmail.com> <1442581755-2668-10-git-send-email-vijay.kilari@gmail.com> <56001221.7010407@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 Cc: Zoltan Kiss , Ian Campbell , 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 On 22/09/15 10:10, Vijay Kilari wrote: > On Mon, Sep 21, 2015 at 7:50 PM, Julien Grall wrote: >> That's really ugly and you still let GICv2 hardware with nr_lpis != 0. >> As said on v6 I don't want to see any usage of nr_lpis in code except >> for letting the user restricting the number of LPIs supported. >> >> That means that all the code should use gic_nr_irq_ids to know the >> number of LPIs supported. Mixing the 2 usage will lead to big trouble >> latter. > > Here nr_lpis is used to update nr_irq_ids which is used by gic_nr_irq_ids(). That not the only usage of nr_lpis within this series. You are using it to create the IRQ desc for LPIs. We should have only one way to get the number of LPIs (i.e gic_nr_irq_ids()). Any attempt to have 2 different to retrieve the number of LPIs will be a problem later. >> >> So please move nr_lpis in gic-v3 as a parameter and don't export it. > > nr_lpis is user defined/initialized in irq.c . How can we pass this to gic-v3 as > parameter?. You mean to have helper function to read/update nr_lpis? I meant moving the parameter in gic-v3 (i.e moving integer_param(...)). We can speak about moving the parameter in another place when we will have the need to. Regards, -- Julien Grall