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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:13 +0000 (07:52 +0200)
commitbad682e26d6a0345cc0c12dabb340e2545f135ad
treefbab137fb9af60113d71419ea833ae5d9d3d951c
parent341029c2024ba907462a494517b14487c254e264
arm64: Relax ARM_SMCCC_ARCH_WORKAROUND_1 discovery

[ Upstream commit e21da1c992007594d391e7b301779cf30f438691 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/cpu_errata.c