OSDN Git Service

arm64: Relax ARM_SMCCC_ARCH_WORKAROUND_1 discovery
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 9 Mar 2018 15:40:50 +0000 (15:40 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 9 Mar 2018 17:52:07 +0000 (17:52 +0000)
commite21da1c992007594d391e7b301779cf30f438691
treee306067d92c50954a3685832c16b221fce32d9b1
parentb08e5fd90bfc7553d36fa42a03fb7f5e82d252eb
arm64: Relax ARM_SMCCC_ARCH_WORKAROUND_1 discovery

A recent update to the ARM SMCCC ARCH_WORKAROUND_1 specification
allows firmware to return a non zero, positive value to describe
that although the mitigation is implemented at the higher exception
level, the CPU on which the call is made is not affected.

Let's relax the check on the return value from ARCH_WORKAROUND_1
so that we only error out if the returned value is negative.

Fixes: b092201e0020 ("arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpu_errata.c