diff options
author | Julien Thierry | 2019-01-31 15:58:52 +0100 |
---|---|---|
committer | Catalin Marinas | 2019-02-06 11:05:20 +0100 |
commit | e9ab7a2e333615497b3fc426c379c330230c2b50 (patch) | |
tree | 5ca4d489978593adb281adb7f9a5ad5a13fb587e /arch/arm64/kernel/cpufeature.c | |
parent | arm64: daifflags: Include PMR in daifflags restore operations (diff) | |
download | kernel-qcow2-linux-e9ab7a2e333615497b3fc426c379c330230c2b50.tar.gz kernel-qcow2-linux-e9ab7a2e333615497b3fc426c379c330230c2b50.tar.xz kernel-qcow2-linux-e9ab7a2e333615497b3fc426c379c330230c2b50.zip |
arm64: alternative: Allow alternative status checking per cpufeature
In preparation for the application of alternatives at different points
during the boot process, provide the possibility to check whether
alternatives for a feature of interest was already applied instead of
having a global boolean for all alternatives.
Make VHE enablement code check for the VHE feature instead of considering
all alternatives.
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Marc Zyngier <Marc.Zyngier@arm.com>
Cc: Christoffer Dall <Christoffer.Dall@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/cpufeature.c')
-rw-r--r-- | arch/arm64/kernel/cpufeature.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 6f56e0ab63a1..d607ea33228c 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1118,7 +1118,7 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) * that, freshly-onlined CPUs will set tpidr_el2, so we don't need to * do anything here. */ - if (!alternatives_applied) + if (!alternative_is_applied(ARM64_HAS_VIRT_HOST_EXTN)) write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); } #endif |