[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 10/31] xen/arm: ITS: Introduce gic_is_lpi helper function
Hi, On 03/09/2015 07:32, Vijay Kilari wrote: On Tue, Sep 1, 2015 at 6:32 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:On 01/09/15 12:56, Vijay Kilari wrote:BTW, I suggested to create a field nr_lpis but you decided to store the number of bits supported. Why?I have nr_lpis field in vgic structure (patch #17). But it just tells how LPIs are supported for a domain.Why are you speaking about vgic structure? I'm only suggesting to replace you nr_id_bits by nr_lpis in the hw GIC. AFAICT, there is nothing to prevent having 2 field using the same name on 2 differents structure...Where as nr_id_bits shows total number of lpis that hw supports.No nr_id_bits shows the total number of interrupt not LPIs. The total number of LPIs is (1 << nr_id_bits) - 8092. Although (1 << nr_id_bits) gives you the last LPI interrupt ID supported. Anyway, as I said earlier, re-calculating the last LPI interrupt ID everytime based on the shift is time consuming. You should optimize for the common case rather than using copy the raw value (i.e ID bits) from the HW directly. Maybe the name "max_lpi_id" would make more sense to you for a name?Instead of storing max_lpi_id which is ( 1 << nr_id_bits) - 8192, I prefer to rename nr_id_bits as nr_irq_ids which can be initialized to (1 << nr_id_bits) for gicv3 and gicv2_info.nr_lines for gicv2. I'm fine with that. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |