[PATCH 1/2] powerpc/64s: Work around spurious warning on old gccs with -fsanitize-coverage

Andrew Donnellan andrew.donnellan at au1.ibm.com
Fri Feb 8 14:11:32 AEDT 2019


On 8/2/19 2:02 pm, Michael Ellerman wrote:> I'd prefer a minimal fix 
that we can backport. How about:
> 
> 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)
> 

Sure, I can send a v2 with this fix and your signoff?

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Linuxppc-dev mailing list