[PATCH v5 0/6] powerpc: switch VDSO to C implementation.

From: Christophe Leroy
Date: Thu Jan 30 2020 - 11:08:39 EST


This is a fifth version of a series to switch powerpc VDSO to generic
C implementation. All previous where RFCs. This one has reached a
mature status.

It is tested on PPC32 (mpc885 and mpc8321E).
It is build tested on kisskb
(http://kisskb.ellerman.id.au/kisskb/head/abf15916bd65f808b07fe9a2377db965a37071e4/)
In PPC64 mode it now builds both VDSO64 and VDSO32.

The two first patches are optimisation around the way vdso datapage is
handled. They are worth merging now even if we want to wait a little
more for the entire series.

The next three patches are optimisations to the GENERIC C VDSO code.
Without them, the performance of the VDSO time functions are too
degraded compared to the current ASM version to be worth switching
the C VDSO.

This series applies on today's powerpc/merge branch.

See the last patch for details on changes and performance.

Christophe Leroy (6):
powerpc/vdso64: Switch from __get_datapage() to get_datapage inline
macro
powerpc/vdso: Remove __kernel_datapage_offset and simplify
__get_datapage()
lib/vdso: Allow architectures to provide the vdso data pointer
lib/vdso: Allow fixed clock mode
lib/vdso: Allow architectures to override the ns shift operation
powerpc/vdso: Switch VDSO to generic C implementation.

arch/powerpc/Kconfig | 2 +
arch/powerpc/include/asm/vdso/gettimeofday.h | 158 ++++++++++
arch/powerpc/include/asm/vdso/vsyscall.h | 25 ++
arch/powerpc/include/asm/vdso_datapage.h | 51 ++--
arch/powerpc/kernel/asm-offsets.c | 49 +---
arch/powerpc/kernel/time.c | 90 ------
arch/powerpc/kernel/vdso.c | 58 +---
arch/powerpc/kernel/vdso32/Makefile | 32 +-
arch/powerpc/kernel/vdso32/cacheflush.S | 2 +-
arch/powerpc/kernel/vdso32/config-fake32.h | 34 +++
arch/powerpc/kernel/vdso32/datapage.S | 7 +-
arch/powerpc/kernel/vdso32/gettimeofday.S | 291 +------------------
arch/powerpc/kernel/vdso32/vdso32.lds.S | 7 +-
arch/powerpc/kernel/vdso32/vgettimeofday.c | 29 ++
arch/powerpc/kernel/vdso64/Makefile | 23 +-
arch/powerpc/kernel/vdso64/cacheflush.S | 9 +-
arch/powerpc/kernel/vdso64/datapage.S | 31 +-
arch/powerpc/kernel/vdso64/gettimeofday.S | 243 +---------------
arch/powerpc/kernel/vdso64/vdso64.lds.S | 7 +-
arch/powerpc/kernel/vdso64/vgettimeofday.c | 29 ++
lib/vdso/gettimeofday.c | 98 +++++--
21 files changed, 467 insertions(+), 808 deletions(-)
create mode 100644 arch/powerpc/include/asm/vdso/gettimeofday.h
create mode 100644 arch/powerpc/include/asm/vdso/vsyscall.h
create mode 100644 arch/powerpc/kernel/vdso32/config-fake32.h
create mode 100644 arch/powerpc/kernel/vdso32/vgettimeofday.c
create mode 100644 arch/powerpc/kernel/vdso64/vgettimeofday.c

--
2.25.0