Re: [PATCH RFC v10 07/22] arm64: Initialize POR_EL1 register on cpu_resume()
From: Yeoreum Yun
Date: Tue Nov 10 2026 - 11:45:01 EST
On Tue, Nov 10, 2026 at 03:53:30PM +0000, Mark Brown wrote:
> 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.
Thanks. seems required to isb() after initialising SYS_POR_EL1.
--
Sincerely,
Yeoreum Yun