Skip to content

Commit

Permalink
arm64: Unconditionally set virtual cpu id registers
Browse files Browse the repository at this point in the history
Commit 78869f0 ("arm64: Extract parts of el2_setup into a macro")
reorganized el2 setup in such way that virtual cpu id registers set
only in nVHE, yet they used (and need) to be set irrespective VHE
support.

Fixes: 78869f0 ("arm64: Extract parts of el2_setup into a macro")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Vladimir Murzin authored and gregkh committed Mar 20, 2021
1 parent bd3cc4b commit 167a6f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/include/asm/el2_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
.endm

/* Virtual CPU ID registers */
.macro __init_el2_nvhe_idregs
.macro __init_el2_idregs
mrs x0, midr_el1
mrs x1, mpidr_el1
msr vpidr_el2, x0
Expand Down Expand Up @@ -163,6 +163,7 @@
__init_el2_stage2
__init_el2_gicv3
__init_el2_hstr
__init_el2_idregs

/*
* When VHE is not in use, early init of EL2 needs to be done here.
Expand All @@ -171,7 +172,6 @@
* will be done via the _EL1 system register aliases in __cpu_setup.
*/
.ifeqs "\mode", "nvhe"
__init_el2_nvhe_idregs
__init_el2_nvhe_cptr
__init_el2_nvhe_sve
__init_el2_nvhe_prepare_eret
Expand Down

0 comments on commit 167a6f9

Please sign in to comment.