From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 08/17] xen/arm: ITS: Add APIs to add and assign device Date: Wed, 15 Jul 2015 15:14:11 +0200 Message-ID: <55A65CA3.6080606@citrix.com> References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-9-git-send-email-vijay.kilari@gmail.com> <1436539933.10074.70.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: <1436539933.10074.70.camel@citrix.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: Ian Campbell , vijay.kilari@gmail.com Cc: stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 10/07/2015 16:52, Ian Campbell wrote: >> +static struct its_device *its_alloc_device(u32 devid) >> +{ >> + struct its_device *dev; >> + paddr_t *itt; >> + unsigned long *lpi_map; >> + int lpi_base, nr_lpis, sz; >> + u32 nr_ites; >> + >> + dev = xzalloc(struct its_device); >> + if ( dev == NULL ) >> + return NULL; >> + >> + dev->its = its_get_phys_node(devid); >> + /* TODO: Use pci helper to get nvecs */ >> + nr_ites = 64; > > Please add nr_ites as a parameter to this function and to > its_add_device, such that this hardcoding can be pushed all the way down > into the final patch which adds the temporary registration code in > xen/arch/arm/platforms/thunderx.c. +1, I would also add the physical ITS in parameter as it's not possible to get it based on the devID (see its_get_phys_node). Regards, -- Julien Grall