summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/alternative.h
diff options
context:
space:
mode:
authorJulien Thierry <julien.thierry@arm.com>2019-01-31 17:58:52 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2019-02-06 13:05:20 +0300
commite9ab7a2e333615497b3fc426c379c330230c2b50 (patch)
tree5ca4d489978593adb281adb7f9a5ad5a13fb587e /arch/arm64/include/asm/alternative.h
parent8cb7eff32cc00697d4a37b1ed569c72ee2039ca4 (diff)
downloadlinux-e9ab7a2e333615497b3fc426c379c330230c2b50.tar.xz
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/include/asm/alternative.h')
-rw-r--r--arch/arm64/include/asm/alternative.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h
index 4b650ec1d7dd..9806a2357e70 100644
--- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h
@@ -14,8 +14,6 @@
#include <linux/stddef.h>
#include <linux/stringify.h>
-extern int alternatives_applied;
-
struct alt_instr {
s32 orig_offset; /* offset to original instruction */
s32 alt_offset; /* offset to replacement instruction */
@@ -28,6 +26,7 @@ typedef void (*alternative_cb_t)(struct alt_instr *alt,
__le32 *origptr, __le32 *updptr, int nr_inst);
void __init apply_alternatives_all(void);
+bool alternative_is_applied(u16 cpufeature);
#ifdef CONFIG_MODULES
void apply_alternatives_module(void *start, size_t length);