]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/powernv: Get STF barrier requirements from device-tree
authorRussell Currey <ruscur@russell.cc>
Mon, 4 Apr 2022 10:15:36 +0000 (20:15 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:09 +0000 (10:26 +0200)
commitc3d16fd84b059bfebac363c4448e11789a05c88a
treef0d1974d98339940a28db3d87457b53635538549
parent0ae43988bc7c995d2ad12109ed706c8852be238c
powerpc/powernv: Get STF barrier requirements from device-tree

[ Upstream commit d2a3c131981d4498571908df95c3c9393a00adf5 ]

The device-tree property no-need-store-drain-on-priv-state-switch is
equivalent to H_CPU_BEHAV_NO_STF_BARRIER from the
H_CPU_GET_CHARACTERISTICS hcall on pseries.

Since commit 84ed26fd00c5 ("powerpc/security: Add a security feature for
STF barrier") powernv systems with this device-tree property have been
enabling the STF barrier when they have no need for it.  This patch
fixes this by clearing the STF barrier feature on those systems.

Fixes: 84ed26fd00c5 ("powerpc/security: Add a security feature for STF barrier")
Reported-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220404101536.104794-2-ruscur@russell.cc
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/setup.c