summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/alternative.h
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2019-01-31 14:58:53 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2019-02-06 10:05:20 +0000
commit0ceb0d56905e3d141fae77e5936d00eee9233473 (patch)
tree384a6df2ab4fa2d83c2bae02797d9581a9c9e929 /arch/arm64/include/asm/alternative.h
parente9ab7a2e333615497b3fc426c379c330230c2b50 (diff)
arm64: alternative: Apply alternatives early in boot process
Currently alternatives are applied very late in the boot process (and a long time after we enable scheduling). Some alternative sequences, such as those that alter the way CPU context is stored, must be applied much earlier in the boot sequence. Introduce apply_boot_alternatives() to allow some alternatives to be applied immediately after we detect the CPU features of the boot CPU. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> [julien.thierry@arm.com: rename to fit new cpufeature framework better, apply BOOT_SCOPE feature early in boot] Signed-off-by: Julien Thierry <julien.thierry@arm.com> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Christoffer Dall <christoffer.dall@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h
index 9806a2357e70..b9f8d787eea9 100644
--- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h
@@ -25,6 +25,7 @@ struct alt_instr {
typedef void (*alternative_cb_t)(struct alt_instr *alt,
__le32 *origptr, __le32 *updptr, int nr_inst);
+void __init apply_boot_alternatives(void);
void __init apply_alternatives_all(void);
bool alternative_is_applied(u16 cpufeature);