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