]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: Make asm/cache.h compatible with vDSO
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 3 Mar 2025 11:11:04 +0000 (12:11 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 8 Mar 2025 13:37:39 +0000 (14:37 +0100)
asm/cache.h can be used during the vDSO build through vdso/cache.h.
Not all definitions in it are compatible with the vDSO, especially the
compat vDSO.

Hide the more complex definitions from the vDSO build.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-2-c1b5c69a166f@linutronix.de
arch/arm64/include/asm/cache.h

index 06a4670bdb0b9b7552d553cee3cc70a6e15b2b93..99cd6546e72e35cfbceec7ce0a0f64498dfadd38 100644 (file)
@@ -35,7 +35,7 @@
 #define ARCH_DMA_MINALIGN      (128)
 #define ARCH_KMALLOC_MINALIGN  (8)
 
-#ifndef __ASSEMBLY__
+#if !defined(__ASSEMBLY__) && !defined(BUILD_VDSO)
 
 #include <linux/bitops.h>
 #include <linux/kasan-enabled.h>
@@ -118,6 +118,6 @@ static inline u32 __attribute_const__ read_cpuid_effective_cachetype(void)
        return ctr;
 }
 
-#endif /* __ASSEMBLY__ */
+#endif /* !defined(__ASSEMBLY__) && !defined(BUILD_VDSO) */
 
 #endif