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

Re: [Xen-devel] [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis



Hi Ian,

On 13/01/15 15:38, Ian Campbell wrote:
> On Fri, 2014-12-12 at 14:43 +0000, Julien Grall wrote:
>> The field nr_lines in the arch_domain vgic structure contains the number of
>> SPIs for the emulated GIC. Using the nr_lines make confusion with the GIC
>> code, where it means the number of IRQs. This can lead to coding error.
>>
>> Also introduce vgic_nr_lines to get the number of IRQ handled by the emulated
>> GIC.
> 
> From the code you seem to have called it vgic_nr_irqs, which I prefer.

It's an error in the commit message. I will fix it in the next version.


>> diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
>> index faad1ff..31fb81a 100644
>> --- a/xen/arch/arm/gic-v2.c
>> +++ b/xen/arch/arm/gic-v2.c
>> @@ -432,8 +432,6 @@ static int gicv2v_setup(struct domain *d)
>>          d->arch.vgic.cbase = GUEST_GICC_BASE;
>>      }
>>  
>> -    d->arch.vgic.nr_lines = 0;
> 
> Not replaced with an assignment to nr_spis, as you do in the v3 case?
> 
> We should be consistent, which also makes me wonder if nr_lines^Wspis
> should be the responsibility of the common vgic code to setup.

Actually it's already in common vgic code (see domain_vgic_init).

The initialization in gicv2v_setup was unnecessary, so does in
gic_v3_init. I just forgot to drop it.

Shall I create a separate patch for the 2 lines drop? Or add a comment
in the commit message?

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