Re: [PATCH 2/2] arm64: suspend: Save GCS state over suspend

From: Mark Brown

Date: Wed Nov 11 2026 - 09:04:48 EST


On Wed, Nov 11, 2026 at 01:44:40PM +0000, Vladimir Murzin wrote:
> On 11/5/26 16:05, Mark Brown wrote:
> > GCSCRE0_EL1 and GCSPR_EL0 are live registers for EL0 on systems with GCS
> > but are not saved and restored by cpu_do_suspend()/cpu_do_resume(). This

> > +alternative_else_nop_endif
> > +alternative_if ARM64_HAS_GCS
> > + mrs x2, REG_GCSPR_EL0
> > + str x2, [x0, #128]
> > + mrs x2, REG_GCSCRE0_EL1
> > + str x2, [x0, #136]

> Have you considered using stp?

It seemed better to keep the code repetitively simliar to the
surrounding code and also avoid using an additional registers.

Attachment: signature.asc
Description: PGP signature