]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'timers-vdso-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Feb 2026 01:02:23 +0000 (17:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Feb 2026 01:02:23 +0000 (17:02 -0800)
Pull VDSO updates from Thomas Gleixner:

 - Provide the missing 64-bit variant of clock_getres()

   This allows the extension of CONFIG_COMPAT_32BIT_TIME to the vDSO and
   finally the removal of 32-bit time types from the kernel and UAPI.

 - Remove the useless and broken getcpu_cache from the VDSO

   The intention was to provide a trivial way to retrieve the CPU number
   from the VDSO, but as the VDSO data is per process there is no way to
   make it work.

 - Switch get/put_unaligned() from packed struct to memcpy()

   The packed struct violates strict aliasing rules which requires to
   pass -fno-strict-aliasing to the compiler. As this are scalar values
   __builtin_memcpy() turns them into simple loads and stores

 - Use __typeof_unqual__() for __unqual_scalar_typeof()

   The get/put_unaligned() changes triggered a new sparse warning when
   __beNN types are used with get/put_unaligned() as sparse builds add a
   special 'bitwise' attribute to them which prevents sparse to evaluate
   the Generic in __unqual_scalar_typeof().

   Newer sparse versions support __typeof_unqual__() which avoids the
   problem, but requires a recent sparse install. So this adds a sanity
   check to sparse builds, which validates that sparse is available and
   capable of handling it.

 - Force inline __cvdso_clock_getres_common()

   Compilers sometimes un-inline agressively, which results in function
   call overhead and problems with automatic stack variable
   initialization.

   Interestingly enough the force inlining results in smaller code than
   the un-inlined variant produced by GCC when optimizing for size.

* tag 'timers-vdso-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  vdso/gettimeofday: Force inlining of __cvdso_clock_getres_common()
  x86/percpu: Make CONFIG_USE_X86_SEG_SUPPORT work with sparse
  compiler: Use __typeof_unqual__() for __unqual_scalar_typeof()
  powerpc/vdso: Provide clock_getres_time64()
  tools headers: Remove unneeded ignoring of warnings in unaligned.h
  tools headers: Update the linux/unaligned.h copy with the kernel sources
  vdso: Switch get/put_unaligned() from packed struct to memcpy()
  parisc: Inline a type punning version of get_unaligned_le32()
  vdso: Remove struct getcpu_cache
  MIPS: vdso: Provide getres_time64() for 32-bit ABIs
  arm64: vdso32: Provide clock_getres_time64()
  ARM: VDSO: Provide clock_getres_time64()
  ARM: VDSO: Patch out __vdso_clock_getres() if unavailable
  x86/vdso: Provide clock_getres_time64() for x86-32
  selftests: vDSO: vdso_test_abi: Add test for clock_getres_time64()
  selftests: vDSO: vdso_test_abi: Use UAPI system call numbers
  selftests: vDSO: vdso_config: Add configurations for clock_getres_time64()
  vdso: Add prototype for __vdso_clock_getres_time64()

1  2 
Makefile
include/linux/compiler.h
include/linux/compiler_types.h
include/linux/syscalls.h
kernel/sys.c
tools/include/linux/compiler_types.h

diff --cc Makefile
Simple merge
Simple merge
index 26d322d432248d44337c16be139ba27677acf049,377df1e64096847bbf5f0981a0c2de9bc3530136..3c936b1298601d4cf9b29149e5a51b2a34710518
@@@ -619,26 -595,11 +628,30 @@@ struct ftrace_likely_data 
                         __scalar_type_to_expr_cases(long),             \
                         __scalar_type_to_expr_cases(long long),        \
                         default: (x)))
+ #else
+ #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
+ #endif
+ #endif /* !__ASSEMBLY__ */
  
 +/*
 + * __signed_scalar_typeof(x) - Declare a signed scalar type, leaving
 + *                           non-scalar types unchanged.
 + */
 +
 +#define __scalar_type_to_signed_cases(type)                           \
 +              unsigned type:  (signed type)0,                         \
 +              signed type:    (signed type)0
 +
 +#define __signed_scalar_typeof(x) typeof(                             \
 +              _Generic((x),                                           \
 +                       char:  (signed char)0,                         \
 +                       __scalar_type_to_signed_cases(char),           \
 +                       __scalar_type_to_signed_cases(short),          \
 +                       __scalar_type_to_signed_cases(int),            \
 +                       __scalar_type_to_signed_cases(long),           \
 +                       __scalar_type_to_signed_cases(long long),      \
 +                       default: (x)))
 +
  /* Is this type a native word size -- useful for atomic operations */
  #define __native_word(t) \
        (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
Simple merge
diff --cc kernel/sys.c
Simple merge
Simple merge