Re: [RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-21 Thread Hector Martin 'marcan'
I already mentioned this privately, but for the benefit of the ML: On 21/01/2021 09.48, Mohamed Mediouni wrote: If we explicitly use the hardware override registers for this, then we'll be unable to use the deep sleep support provided by wfi on Apple SoCs later on without touching

Re: [RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-21 Thread Arnd Bergmann
On Thu, Jan 21, 2021 at 12:01 PM Mohamed Mediouni wrote: > > On 21 Jan 2021, at 11:52, Arnd Bergmann wrote: > > > > On Wed, Jan 20, 2021 at 2:27 PM Mohamed Mediouni > > wrote: > >> --- a/arch/arm64/kernel/cpu_ops.c > >> +++ b/arch/arm64/kernel/cpu_ops.c > > > >> #if

Re: [RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-21 Thread Mohamed Mediouni
> On 21 Jan 2021, at 11:52, Arnd Bergmann wrote: > > On Wed, Jan 20, 2021 at 2:27 PM Mohamed Mediouni > wrote: >> --- a/arch/arm64/kernel/cpu_ops.c >> +++ b/arch/arm64/kernel/cpu_ops.c > >> #if defined(CONFIG_STACKPROTECTOR) && >> !defined(CONFIG_STACKPROTECTOR_PER_TASK) >> #include >> @@

Re: [RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-21 Thread Arnd Bergmann
On Wed, Jan 20, 2021 at 2:27 PM Mohamed Mediouni wrote: > --- a/arch/arm64/kernel/cpu_ops.c > +++ b/arch/arm64/kernel/cpu_ops.c > #if defined(CONFIG_STACKPROTECTOR) && > !defined(CONFIG_STACKPROTECTOR_PER_TASK) > #include > @@ -74,8 +75,14 @@ void (*arm_pm_restart)(enum reboot_mode

[RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-20 Thread Mohamed Mediouni
From: Stan Skowronek WFI drops register state on Apple Silicon for SMP systems. This hook will be used for a hardware workaround in the Apple CPU start driver. Signed-off-by: Stan Skowronek Signed-off-by: Mohamed Mediouni --- arch/arm64/include/asm/cpu_ops.h | 2 ++

Re: [RFC PATCH 2/7] arm64: kernel: Add a WFI hook.

2021-01-20 Thread Alexander Graf
On 20.01.21 14:27, Mohamed Mediouni wrote: From: Stan Skowronek WFI drops register state on Apple Silicon for SMP systems. It probably drops the register because it loses power on WFI, right? Have you tried to set the ARM64_REG_CYC_OVRD_ok2pwrdn_force_up bit in ARM64_REG_CYC_OVRD yet? XNU