drm/rockchip: vop2: Fix the windows switch between different layers
[drm/drm-misc.git] / arch / mips / vdso / vgettimeofday.c
blob604afea3f33630772dcf7a3773635e8f8b6f1615
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * MIPS64 and compat userspace implementations of gettimeofday()
4 * and similar.
6 * Copyright (C) 2015 Imagination Technologies
7 * Copyright (C) 2018 ARM Limited
9 */
10 #include <linux/time.h>
11 #include <linux/types.h>
12 #include <vdso/gettime.h>
14 #if _MIPS_SIM != _MIPS_SIM_ABI64
15 int __vdso_clock_gettime(clockid_t clock,
16 struct old_timespec32 *ts)
18 return __cvdso_clock_gettime32(clock, ts);
21 #ifdef CONFIG_MIPS_CLOCK_VSYSCALL
24 * This is behind the ifdef so that we don't provide the symbol when there's no
25 * possibility of there being a usable clocksource, because there's nothing we
26 * can do without it. When libc fails the symbol lookup it should fall back on
27 * the standard syscall path.
29 int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
30 struct timezone *tz)
32 return __cvdso_gettimeofday(tv, tz);
35 #endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
37 int __vdso_clock_getres(clockid_t clock_id,
38 struct old_timespec32 *res)
40 return __cvdso_clock_getres_time32(clock_id, res);
43 int __vdso_clock_gettime64(clockid_t clock,
44 struct __kernel_timespec *ts)
46 return __cvdso_clock_gettime(clock, ts);
49 #else
51 int __vdso_clock_gettime(clockid_t clock,
52 struct __kernel_timespec *ts)
54 return __cvdso_clock_gettime(clock, ts);
57 #ifdef CONFIG_MIPS_CLOCK_VSYSCALL
60 * This is behind the ifdef so that we don't provide the symbol when there's no
61 * possibility of there being a usable clocksource, because there's nothing we
62 * can do without it. When libc fails the symbol lookup it should fall back on
63 * the standard syscall path.
65 int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
66 struct timezone *tz)
68 return __cvdso_gettimeofday(tv, tz);
71 #endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
73 int __vdso_clock_getres(clockid_t clock_id,
74 struct __kernel_timespec *res)
76 return __cvdso_clock_getres(clock_id, res);
79 #endif