Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vdso: Move ENABLE_COMPAT_VDSO from core to arm64

The ENABLE_COMAPT_VDSO symbol is only used by arm64 and only for the
time-related functionality. There should be no new users, so it doesn't
need to be in the generic vDSO code.

Move the logic into arm64 architecture-specific code and replace the
explicit define by the standard '#ifdef __aarch64__'.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/all/20250826-vdso-cleanups-v1-3-d9b65750e49f@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
7d298d25 39f1ee12

+14 -12
+3 -4
arch/arm64/include/asm/vdso/compat_barrier.h
··· 7 7 8 8 #ifndef __ASSEMBLY__ 9 9 /* 10 - * Warning: This code is meant to be used with 11 - * ENABLE_COMPAT_VDSO only. 10 + * Warning: This code is meant to be used from the compat vDSO only. 12 11 */ 13 - #ifndef ENABLE_COMPAT_VDSO 14 - #error This header is meant to be used with ENABLE_COMPAT_VDSO only 12 + #ifdef __arch64__ 13 + #error This header is meant to be used with from the compat vDSO only 15 14 #endif 16 15 17 16 #ifdef dmb
+3 -3
arch/arm64/include/asm/vdso/compat_gettimeofday.h
··· 2 2 /* 3 3 * Copyright (C) 2018 ARM Limited 4 4 */ 5 - #ifndef __ASM_VDSO_GETTIMEOFDAY_H 6 - #define __ASM_VDSO_GETTIMEOFDAY_H 5 + #ifndef __ASM_VDSO_COMPAT_GETTIMEOFDAY_H 6 + #define __ASM_VDSO_COMPAT_GETTIMEOFDAY_H 7 7 8 8 #ifndef __ASSEMBLY__ 9 9 ··· 163 163 164 164 #endif /* !__ASSEMBLY__ */ 165 165 166 - #endif /* __ASM_VDSO_GETTIMEOFDAY_H */ 166 + #endif /* __ASM_VDSO_COMPAT_GETTIMEOFDAY_H */
+8
arch/arm64/include/asm/vdso/gettimeofday.h
··· 5 5 #ifndef __ASM_VDSO_GETTIMEOFDAY_H 6 6 #define __ASM_VDSO_GETTIMEOFDAY_H 7 7 8 + #ifdef __aarch64__ 9 + 8 10 #ifndef __ASSEMBLY__ 9 11 10 12 #include <asm/alternative.h> ··· 97 95 #endif /* IS_ENABLED(CONFIG_CC_IS_GCC) && IS_ENABLED(CONFIG_PAGE_SIZE_64KB) */ 98 96 99 97 #endif /* !__ASSEMBLY__ */ 98 + 99 + #else /* !__aarch64__ */ 100 + 101 + #include "compat_gettimeofday.h" 102 + 103 + #endif /* __aarch64__ */ 100 104 101 105 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
-1
arch/arm64/kernel/vdso32/Makefile
··· 59 59 VDSO_CAFLAGS += -march=armv8-a 60 60 61 61 VDSO_CFLAGS := $(VDSO_CAFLAGS) 62 - VDSO_CFLAGS += -DENABLE_COMPAT_VDSO=1 63 62 # KBUILD_CFLAGS from top-level Makefile 64 63 VDSO_CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 65 64 -fno-strict-aliasing -fno-common \
-4
include/vdso/datapage.h
··· 196 196 * - clock_gettime_fallback(): fallback for clock_gettime. 197 197 * - clock_getres_fallback(): fallback for clock_getres. 198 198 */ 199 - #ifdef ENABLE_COMPAT_VDSO 200 - #include <asm/vdso/compat_gettimeofday.h> 201 - #else 202 199 #include <asm/vdso/gettimeofday.h> 203 - #endif /* ENABLE_COMPAT_VDSO */ 204 200 205 201 #else /* !__ASSEMBLY__ */ 206 202