Subject: Re: [PATCH 0/3] arm64: Fix cpuidle with pseudo-NMI enabled

From: Valentin Schneider <[email-masked]>
Date: Wed, 09 Jun 2021 15:46:43 +0100

Hi Marc,

On 08/06/21 18:27, Marc Zyngier wrote:
> It appears that although cpu_do_idle() is correctly dealing with the
> PMR/DAIF duality, the PSCI cpu-suspend code has been left unaware of
> it.
>
> On a system that uses PSCI for idle (such as the Ampere Altra I have
> access to), the kernel dies as soon as it enters idle (interrupts are
> off at the GIC CPU interface level). Boo.
>
> Instead of spreading more magic code around, I've elected to provide a
> pair of helpers (arm_cpuidle_{save,restore}_context()) which do the
> heavy lifting.
>
> With that in place, I can finally boot the above system with
> irqchip.gicv3_pseudo_nmi=1. I'd welcome feedback from people who may
> have experienced similar issues in the past (and on different
> machines).
>

With pNMIs my Ampere eMAG would always hang at boot, and your patches make
it actually survive. I briefly kicked perf to get some PMU IRQs and that
also seems to be going just fine. Thanks for digging into this mess!

Tested-by: Valentin Schneider <[email-masked]>

> Marc Zyngier (3):
>   arm64: Add cpuidle context save/restore helpers
>   arm64: Convert cpu_do_idle() to using cpuidle context helpers
>   PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter()
>
>  arch/arm/include/asm/cpuidle.h   |  5 ++++
>  arch/arm64/include/asm/cpuidle.h | 35 +++++++++++++++++++++++++++
>  arch/arm64/kernel/process.c      | 41 +++++++-------------------------
>  drivers/firmware/psci/psci.c     |  5 ++++
>  4 files changed, 54 insertions(+), 32 deletions(-)
>
> --
> 2.30.2

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel