[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 08/17] xen/arm: ITS: Add APIs to add and assign device



Hi Vijay,

On 16/07/2015 15:40, Vijay Kilari wrote:
On Wed, Jul 15, 2015 at 6:44 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
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).

   thunderx.c does not have physical ITS to pass as parameter.

That's not true. You are able to get the PCI root controller which should have a phandle to the ITS device tree node.

With this dt node in hand you can get the correct physical ITS.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.