Re: [PATCH v3] vdso: Remove struct getcpu_cache
From: Heiko Carstens <hca@linux.ibm.com>
Date: 2026-01-02 12:20:52
Also in:
linux-kselftest, linux-s390, lkml, loongarch
On Tue, Dec 30, 2025 at 08:08:44AM +0100, Thomas Weißschuh wrote:
The cache parameter of getcpu() is useless nowadays for various reasons. * It is never passed by userspace for either the vDSO or syscalls. * It is never used by the kernel. * It could not be made to work on the current vDSO architecture. * The structure definition is not part of the UAPI headers. * vdso_getcpu() is superseded by restartable sequences in any case. Remove the struct and its header. As a side-effect we get rid of an unwanted inclusion of the linux/ header namespace from vDSO code. Signed-off-by: Thomas Weißschuh <redacted> --- Changes in v3: - Rebase on v6.19-rc1 - Fix conflict with UML vdso_getcpu() removal - Flesh out commit message - Link to v2: https://lore.kernel.org/r/20251013-getcpu_cache-v2-1-880fbfa3b7cc@linutronix.de (local) Changes in v2: - Rebase on v6.18-rc1 - Link to v1: https://lore.kernel.org/r/20250826-getcpu_cache-v1-1-8748318f6141@linutronix.de (local) --- We could also completely remove the parameter, but I am not sure if that is a good idea for syscalls and vDSO entrypoints. --- arch/loongarch/vdso/vgetcpu.c | 5 ++--- arch/s390/kernel/vdso/getcpu.c | 3 +-- arch/s390/kernel/vdso/vdso.h | 4 +--- arch/x86/entry/vdso/vgetcpu.c | 5 ++--- arch/x86/include/asm/vdso/processor.h | 4 +--- include/linux/getcpu.h | 19 ------------------- include/linux/syscalls.h | 3 +-- kernel/sys.c | 4 +--- tools/testing/selftests/vDSO/vdso_test_getcpu.c | 4 +--- 9 files changed, 10 insertions(+), 41 deletions(-)
Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390