[PATCH 5/9] powerpc/vdso: Directly include the generic vDSO implementations

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Dec 4 05:44:06 PST 2026


On Fri, Dec 04, 2026 at 11:28:19AM +0100, Christophe Leroy (CS GROUP) wrote:
> Le 04/12/2026 à 08:30, Thomas Weißschuh a écrit :
> > The inclusion of the generic vDSO implementation through compiler
> > arguments is complicated and non-obvious.
> > 
> > Directly include the .c files instead.
> > 
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
> > ---
> >   arch/powerpc/kernel/vdso/Makefile        | 10 +---------
> >   arch/powerpc/kernel/vdso/vgetrandom.c    |  2 ++
> >   arch/powerpc/kernel/vdso/vgettimeofday.c |  2 ++
> >   3 files changed, 5 insertions(+), 9 deletions(-)
> > 
> > diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
> > index 0d1a49529885..386eb3778934 100644
> > --- a/arch/powerpc/kernel/vdso/Makefile
> > +++ b/arch/powerpc/kernel/vdso/Makefile
> > @@ -11,19 +11,11 @@ obj-vdso64 = sigtramp64-64.o gettimeofday-64.o datapage-64.o cacheflush-64.o not
> >   obj-vdso32 += getrandom-32.o vgetrandom-chacha-32.o
> >   obj-vdso64 += getrandom-64.o vgetrandom-chacha-64.o
> > -ifneq ($(c-gettimeofday-y),)
> > -  CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y)
> >   # Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true
> >   # by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is
> >   # compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code
> >   # generation is minimal, it will just use r29 instead.
> > -  CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call cc-option, -ffixed-r30)
> > -endif
> > -
> > -ifneq ($(c-getrandom-y),)
> > -  CFLAGS_vgetrandom-32.o += -include $(c-getrandom-y)
> > -  CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y)
> > -endif
> > +CFLAGS_vgettimeofday-64.o += $(call cc-option, -ffixed-r30)
> 
> Maybe it is time to get rid of this fixed r30 workaround ?

Sounds like something for you PowerPC folks to decide.
To me it looks reasonable.
LLVM does not support -ffixed-r30 anyways.

(...)



More information about the linux-arm-kernel mailing list