Skip to content

Commit c82357a

Browse files
committed
Merge tag 'powerpc-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Don't use r30 in VDSO code, to avoid breaking existing Go lang programs. - Change an export symbol to allow non-GPL modules to use spinlocks again. Thanks to Paul Menzel, and Srikar Dronamraju. * tag 'powerpc-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vdso: Don't use r30 to avoid breaking Go lang powerpc/pseries: Fix regression while building external modules
2 parents aa66032 + a88603f commit c82357a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

arch/powerpc/kernel/vdso64/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ KASAN_SANITIZE := n
2727

2828
ccflags-y := -shared -fno-common -fno-builtin -nostdlib \
2929
-Wl,-soname=linux-vdso64.so.1 -Wl,--hash-style=both
30+
31+
# Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true
32+
# by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is
33+
# compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code
34+
# generation is minimal, it will just use r29 instead.
35+
ccflags-y += $(call cc-option, -ffixed-r30)
36+
3037
asflags-y := -D__VDSO64__ -s
3138

3239
targets += vdso64.lds

arch/powerpc/platforms/pseries/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#include "../../../../drivers/pci/pci.h"
7878

7979
DEFINE_STATIC_KEY_FALSE(shared_processor);
80-
EXPORT_SYMBOL_GPL(shared_processor);
80+
EXPORT_SYMBOL(shared_processor);
8181

8282
int CMO_PrPSP = -1;
8383
int CMO_SecPSP = -1;

0 commit comments

Comments
 (0)