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

Re: [Xen-devel] [PATCH v3 6/9] x86/genapic: patch indirect calls to direct ones



>>> On 21.09.18 at 13:03, <wei.liu2@xxxxxxxxxx> wrote:
> On Tue, Sep 11, 2018 at 07:35:33AM -0600, Jan Beulich wrote:
>> --- a/xen/include/asm-x86/mach-generic/mach_apic.h
>> +++ b/xen/include/asm-x86/mach-generic/mach_apic.h
>> @@ -15,8 +15,18 @@
>>  #define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map)
>>  #define init_apic_ldr (genapic.init_apic_ldr)
>>  #define clustered_apic_check (genapic.clustered_apic_check)
>> -#define cpu_mask_to_apicid (genapic.cpu_mask_to_apicid)
>> -#define vector_allocation_cpumask(cpu) 
>> (genapic.vector_allocation_cpumask(cpu))
>> +#define cpu_mask_to_apicid(mask) ({ \
>> +    /* \
>> +     * There are a number of places where the address of a local variable \
>> +     * gets passed here. The use of ?: in alternative_call<N>() triggers an 
>> \
>> +     * "address of ... is always true" warning in such a case with at least 
>> \
>> +     * gcc 7 and 8. Hence the seemingly pointless local variable here. \
>> +     */ \
> 
> Is this still needed given you have brought back the middle operand in ?: in
> patch 1?

Yes, unfortunately. The omitted middle operand silenced a warning
when (arg) was of type bool. This is unrelated to the compiler recognizing
that the address of a local variable is never going to be NULL.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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