1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * ARM64 compat userspace implementations of gettimeofday() and similar. 4 * 5 * Copyright (C) 2018 ARM Limited 6 * 7 */ 8 #define BUILD_VDSO32_64 9 #include <vdso/gettime.h> 10 11 #ifdef CONFIG_COMPAT_32BIT_TIME 12 int __vdso_clock_gettime(clockid_t clock, 13 struct old_timespec32 *ts) 14 { 15 return __cvdso_clock_gettime32(clock, ts); 16 } 17 18 int __vdso_clock_getres(clockid_t clock_id, 19 struct old_timespec32 *res) 20 { 21 return __cvdso_clock_getres_time32(clock_id, res); 22 } 23 24 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, 25 struct timezone *tz) 26 { 27 return __cvdso_gettimeofday(tv, tz); 28 } 29 #endif /* CONFIG_COMPAT_32BIT_TIME */ 30 31 int __vdso_clock_gettime64(clockid_t clock, 32 struct __kernel_timespec *ts) 33 { 34 return __cvdso_clock_gettime(clock, ts); 35 } 36 37 int __vdso_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res) 38 { 39 return __cvdso_clock_getres(clock_id, res); 40 } 41 42 /* Avoid unresolved references emitted by GCC */ 43 44 void __aeabi_unwind_cpp_pr0(void) 45 { 46 } 47 48 void __aeabi_unwind_cpp_pr1(void) 49 { 50 } 51 52 void __aeabi_unwind_cpp_pr2(void) 53 { 54 } 55