arm64: sve: Provide a conditional update accessor for ZCR_ELx
authorMarc Zyngier <maz@kernel.org>
Thu, 18 Mar 2021 09:43:03 +0000 (09:43 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 18 Mar 2021 13:57:28 +0000 (13:57 +0000)
commit71ce1ae56e4d43a0c568e2d4bfb154cd15306a82
tree7178b3428149bcd70d815ddcdb61e8e1d9bef707
parent468f3477ef8bda1beeb91dd7f423c9bc248ac39d
arm64: sve: Provide a conditional update accessor for ZCR_ELx

A common pattern is to conditionally update ZCR_ELx in order
to avoid the "self-synchronizing" effect that writing to this
register has.

Let's provide an accessor that does exactly this.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/fpsimd.h