arm64: Use CPACR_EL1 format to set CPTR_EL2 when E2H is set
authorMarc Zyngier <maz@kernel.org>
Fri, 9 Jun 2023 16:21:50 +0000 (17:21 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 12 Jun 2023 23:17:23 +0000 (23:17 +0000)
commit659803aef48b1a43bf47c6b105f5e3cee6a1501c
treefd95a80752f89339a5d99971bf69831484bc57c3
parent9e7462bbe00d8431694720804a50b8f48d8ed0b0
arm64: Use CPACR_EL1 format to set CPTR_EL2 when E2H is set

When HCR_EL2.E2H is set, the CPTR_EL2 register takes the CPACR_EL1
format. Yes, this is good fun.

Hack the bits of startup code that assume E2H=0 while setting up
CPTR_EL2 to make them grok the CPTR_EL1 format.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20230609162200.2024064-8-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/el2_setup.h