powerpc/64s: Enable barrier_nospec based on firmware settings
authorMichal Suchanek <msuchanek@suse.de>
Thu, 11 Apr 2019 11:46:01 +0000 (21:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:36:40 +0000 (08:36 +0200)
commite1217b4a5acec3da22eee7088b2649bc827eb14e
tree0952503c64dde5f8f72298bb73a517a9dcfe3d03
parent73b0f626499c15b268f7d49d6871d49508edaa56
powerpc/64s: Enable barrier_nospec based on firmware settings

commit cb3d6759a93c6d0aea1c10deb6d00e111c29c19c upstream.

Check what firmware told us and enable/disable the barrier_nospec as
appropriate.

We err on the side of enabling the barrier, as it's no-op on older
systems, see the comment for more detail.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/setup.h
arch/powerpc/kernel/security.c
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/pseries/setup.c