[PATCH 1/2] powerpc/64s: Work around spurious warning on old gccs with -fsanitize-coverage
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Sun Feb 10 16:14:37 AEDT 2019
On 9/2/19 2:41 am, Segher Boessenkool wrote:
> On Fri, Feb 08, 2019 at 02:02:24PM +1100, Michael Ellerman wrote:
>> diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
>> index 8be3721d9302..a1acccd25839 100644
>> --- a/arch/powerpc/kernel/dt_cpu_ftrs.c
>> +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
>> @@ -675,12 +675,10 @@ static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)
>> }
>> }
>>
>> - if (!known && enable_unknown) {
>> - if (!feat_try_enable_unknown(f)) {
>> - pr_info("not enabling: %s (unknown and unsupported by kernel)\n",
>> - f->name);
>> - return false;
>> - }
>> + if (!known && (!enable_unknown || !feat_try_enable_unknown(f))) {
>> + pr_info("not enabling: %s (unknown and unsupported by kernel)\n",
>> + f->name);
>> + return false;
>> }
>>
>> if (m->cpu_ftr_bit_mask)
> cur_cpu_spec->cpu_features |= m->cpu_ftr_bit_mask;
>
> This still set the wrong mask here, which is the bug you're trying to fix.
> It should only do this if "known", afaics.
I've got a v2 ready to send which fixes both things.
>
>
> Segher
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Linuxppc-dev
mailing list