arm64: spectre: Consolidate spectre-v3a detection
authorWill Deacon <will@kernel.org>
Fri, 13 Nov 2020 11:38:46 +0000 (11:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 Nov 2020 10:43:06 +0000 (10:43 +0000)
commitcd1f56b930e857c170d8a04f0f989bfb8a1b5ac1
tree2b246f7cdeef0cd027c0d2a51267979412989b34
parentc4792b6dbc5070fe67f4cdcfdad39416333acbe0
arm64: spectre: Consolidate spectre-v3a detection

The spectre-v3a mitigation is split between cpu_errata.c and spectre.c,
with the former handling detection of the problem and the latter handling
enabling of the workaround.

Move the detection logic alongside the enabling logic, like we do for the
other spectre mitigations.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20201113113847.21619-10-will@kernel.org
arch/arm64/include/asm/spectre.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/proton-pack.c