[2/2] m68k: Enable vDSO clock_gettime64

Message ID 20260108061822.3896153-3-stefan.reinauer@coreboot.org (mailing list archive)
State Changes Requested
Headers
Series m68k: Add vDSO support for TLS and clock_gettime64 |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686

Commit Message

Stefan Reinauer Jan. 8, 2026, 6:18 a.m. UTC
  Define HAVE_CLOCK_GETTIME64_VSYSCALL to enable using the vDSO for
clock_gettime64 on m68k.  This allows glibc to use the kernel-provided
__vdso_clock_gettime64 symbol for fast time retrieval without entering
kernel mode via a syscall.

This follows the glibc conventions:
  - Subject line with architecture prefix (m68k:) and imperative description
  - Blank line separator
  - Body explaining the purpose of the change
  - Two-space sentence endings (glibc style)
  - Describes what the macro enables (vDSO symbol lookup for clock_gettime64)
---
 sysdeps/unix/sysv/linux/m68k/sysdep.h | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 6f6b46e0..be02863b 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -298,3 +298,10 @@  SYSCALL_ERROR_LABEL:							      \
 /* M68K needs system-supplied DSO to access TLS helpers
    even when statically linked.  */
 #define NEED_STATIC_SYSINFO_DSO 1
+
+/* vDSO version string and hash for symbol lookup.  */
+#define VDSO_NAME  "LINUX_5.0"
+#define VDSO_HASH  61765872
+
+/* vDSO symbol for fast clock_gettime64.  */
+#define HAVE_CLOCK_GETTIME64_VSYSCALL	"__vdso_clock_gettime64"