Skip to content

Commit 1f1676b

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5c189c5 commit 1f1676b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/include/asm/barrier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#define wmb() __asm__ __volatile__ ("sync" : : : "memory")
4141

4242
/* The sub-arch has lwsync */
43-
#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
43+
#if defined(CONFIG_PPC64) || defined(CONFIG_PPC_E500MC)
4444
# define SMPWMB LWSYNC
4545
#else
4646
# define SMPWMB eieio

0 commit comments

Comments
 (0)