ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 15 Oct 2018 15:32:01 +0000 (11:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:26 +0000 (09:16 +0200)
commit81b215a5b80b32020daf481f9f037942e4552aa7
treee6e978b9237856f93ea315b52f8bba6b8d9b6fca
parent3e52aff79d5eeac0f71acd054997c0cffa8d6c55
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit

Commit e388b80288aade31135aca23d32eee93dd106795 upstream.

When the branch predictor hardening is enabled, firmware must have set
the IBE bit in the auxiliary control register.  If this bit has not
been set, the Spectre workarounds will not be functional.

Add validation that this bit is set, and print a warning at alert level
if this is not the case.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/Makefile
arch/arm/mm/proc-v7-bugs.c [new file with mode: 0644]
arch/arm/mm/proc-v7.S