[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



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?

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®.