[PATCH v2] arm64: Enable data independent timing (DIT) in the kernel

Will Deacon will at kernel.org
Tue Nov 8 06:56:57 PST 2022


On Tue, Nov 08, 2022 at 02:41:26PM +0000, Mark Rutland wrote:
> On Mon, Nov 07, 2022 at 06:24:00PM +0100, Ard Biesheuvel wrote:
> > diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c
> > index 8b02d310838f9240..3032a82ea51a19f7 100644
> > --- a/arch/arm64/kernel/suspend.c
> > +++ b/arch/arm64/kernel/suspend.c
> > @@ -60,6 +60,8 @@ void notrace __cpu_suspend_exit(void)
> >  	 * PSTATE was not saved over suspend/resume, re-enable any detected
> >  	 * features that might not have been set correctly.
> >  	 */
> > +	if (cpu_has_dit())
> > +		set_pstate_dit(1);
> 
> As above, I'd prefer if we either renamed cpu_has_dit() to cpus_have_dit(), or
> just open-coded this as:
> 
> 	if (cpus_have_const_cap(ARM64_HAS_DIT))
> 		set_pstate_dit(1);
> 
> With either of those options:
> 
>   Acked-by: Mark Rutland <mark.rutland at arm.com>
> 
> I assume Will might fix that up when applying.

Yup, I'll take care of that.

Will



More information about the linux-arm-kernel mailing list