diff options
author | Julien Thierry <julien.thierry@arm.com> | 2019-01-31 14:58:52 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-02-06 10:05:20 +0000 |
commit | e9ab7a2e333615497b3fc426c379c330230c2b50 (patch) | |
tree | 5ca4d489978593adb281adb7f9a5ad5a13fb587e /arch/arm64/kernel/cpufeature.c | |
parent | 8cb7eff32cc00697d4a37b1ed569c72ee2039ca4 (diff) | |
download | linux-e9ab7a2e333615497b3fc426c379c330230c2b50.tar.gz linux-e9ab7a2e333615497b3fc426c379c330230c2b50.tar.bz2 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 |