powerpc/barrier: Use CONFIG_PPC64 for barrier selection
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 26 Nov 2020 13:10:02 +0000 (00:10 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Dec 2020 14:01:10 +0000 (01:01 +1100)
commit1f1676bb2dd52c1054db8476d6387e6dcf62a1ba
tree66e6d46f1132c8ddebbf6a5ad8a2366e22c202ec
parent5c189c523e78d4a70e874477e4b0628fd74207e4
powerpc/barrier: Use CONFIG_PPC64 for barrier selection

Currently we use ifdef __powerpc64__ in barrier.h to decide if we
should use lwsync or eieio for SMPWMB which is then used by
__smp_wmb().

That means when we are building the compat VDSO we will use eieio,
because it's 32-bit code, even though we're building a 64-bit kernel
for a 64-bit CPU.

Although eieio should work, it would be cleaner if we always used the
same barrier, even for the 32-bit VDSO.

So change the ifdef to CONFIG_PPC64, so that the selection is made
based on the bitness of the kernel we're building for, not the current
compilation unit.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201126131006.2431205-5-mpe@ellerman.id.au
arch/powerpc/include/asm/barrier.h