arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 1 Feb 2018 11:07:33 +0000 (11:07 +0000)
committerNitin Garg <nitin.garg@nxp.com>
Fri, 25 May 2018 20:04:55 +0000 (15:04 -0500)
commitd61bf993979829ffe106e1e49867b8973fcd5b0d
treed111a0ee5ce4b0e7aba80528cfe3cc8f3c271b2a
parent77def6d28adf8ba109a2a4244758bb33232b1943
arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17

** Not yet queued for inclusion in mainline **

In order to avoid aliasing attacks against the branch predictor,
some implementations require to invalidate the BTB when switching
from one user context to another.

For this, we reuse the existing implementation for Cortex-A8, and
apply it to A9, A12 and A17.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm/mm/Kconfig
arch/arm/mm/proc-v7-2level.S
arch/arm/mm/proc-v7-3level.S
arch/arm/mm/proc-v7.S