[PATCH RFC v10 07/22] arm64: Initialize POR_EL1 register on cpu_resume()

Mark Brown broonie at kernel.org
Tue Nov 10 07:53:30 PST 2026


On Mon, Nov 09, 2026 at 03:58:32PM +0000, Kevin Brodsky wrote:
> From: Yeoreum Yun <yeoreum.yun at arm.com>
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261110/f2209afe/attachment.sig>


More information about the linux-arm-kernel mailing list