summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/vdso/vsyscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/vdso/vsyscall.h')
-rw-r--r--arch/arm64/include/asm/vdso/vsyscall.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/vdso/vsyscall.h b/arch/arm64/include/asm/vdso/vsyscall.h
new file mode 100644
index 000000000000..3f3c8eb74e2e
--- /dev/null
+++ b/arch/arm64/include/asm/vdso/vsyscall.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_VDSO_VSYSCALL_H
+#define __ASM_VDSO_VSYSCALL_H
+
+#ifndef __ASSEMBLER__
+
+#include <vdso/datapage.h>
+
+#define VDSO_PRECISION_MASK ~(0xFF00ULL<<48)
+
+
+/*
+ * Update the vDSO data page to keep in sync with kernel timekeeping.
+ */
+static __always_inline
+void __arch_update_vdso_clock(struct vdso_clock *vc)
+{
+ vc->mask = VDSO_PRECISION_MASK;
+}
+#define __arch_update_vdso_clock __arch_update_vdso_clock
+
+/* The asm-generic header needs to be included after the definitions above */
+#include <asm-generic/vdso/vsyscall.h>
+
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __ASM_VDSO_VSYSCALL_H */