]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently
authorNicholas Piggin <npiggin@gmail.com>
Thu, 22 Mar 2018 10:41:46 +0000 (20:41 +1000)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:33 +0000 (21:36 -0400)
commit029802817710e886fe74eeeef8282e2f3c124943
tree5f97182c1a035b803dceca0882395d21d7a02106
parent56d7e5711089c7581f194989c12c85cf4fa78c5b
powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently

[ Upstream commit 0bfdf598900fd62869659f360d3387ed80eb71cf ]

asm/barrier.h is not always included after asm/synch.h, which meant
it was missing __SUBARCH_HAS_LWSYNC, so in some files smp_wmb() would
be eieio when it should be lwsync. kernel/time/hrtimer.c is one case.

__SUBARCH_HAS_LWSYNC is only used in one place, so just fold it in
to where it's used. Previously with my small simulator config, 377
instances of eieio in the tree. After this patch there are 55.

Fixes: 46d075be585e ("powerpc: Optimise smp_wmb")
Cc: stable@vger.kernel.org # v2.6.29+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
arch/powerpc/include/asm/barrier.h
arch/powerpc/include/asm/synch.h