arm64: Use firmware to detect CPUs that are not affected by Spectre-v2
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 15 Apr 2019 21:21:24 +0000 (16:21 -0500)
committerWill Deacon <will.deacon@arm.com>
Fri, 26 Apr 2019 15:30:11 +0000 (16:30 +0100)
commit517953c2c47f9c00a002f588ac856a5bc70cede3
treea49d9fa32f4bb7a764feb7cc73d5ed20d63558bd
parent73f38166095947f3b86b02fbed6bd592223a7ac8
arm64: Use firmware to detect CPUs that are not affected by Spectre-v2

The SMCCC ARCH_WORKAROUND_1 service can indicate that although the
firmware knows about the Spectre-v2 mitigation, this particular
CPU is not vulnerable, and it is thus not necessary to call
the firmware on this CPU.

Let's use this information to our benefit.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpu_errata.c