Re: [PATCH RFC v10 07/22] arm64: Initialize POR_EL1 register on cpu_resume()
From: Mark Brown
Date: Tue Nov 10 2026 - 12:08:40 EST
On Mon, Nov 09, 2026 at 03:58:32PM +0000, Kevin Brodsky wrote:
> From: Yeoreum Yun <yeoreum.yun@xxxxxxx>
>
> The POR_EL1 register is reset to an unknown value after cpu_suspend().
> Since POR_EL1 always holds POR_EL1_INIT when entering cpu_suspend(),
> initialize POR_EL1 with POR_EL1_INIT before cpu_do_resume().
> +#ifdef CONFIG_ARM64_POE
> +alternative_if_not ARM64_HAS_S1POE
> + b .Lskip_por_set
> +alternative_else_nop_endif
> + mov_q x2, POR_EL1_INIT
> + msr_s SYS_POR_EL1, x2
> + /* isb can be skipped since cpu_do_resume() will do it. */
> +.Lskip_por_set:
> +#endif /* CONFIG_ARM64_POE */
cpu_do_resume() will update TCR2_EL1 to enable POE again, a sufficiently
unhelpful implementation could potentially decide to do that before this
POR_EL1 value takes effect AFAICT given that there's no barriers.
Attachment:
signature.asc
Description: PGP signature