GNU Linux-libre 5.15.72-gnu
[releases.git] / arch / powerpc / kernel / vdso64 / gettimeofday.S
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Userland implementation of gettimeofday() for 64 bits processes in a
4  * ppc64 kernel for use in the vDSO
5  *
6  * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
7  *                    IBM Corp.
8  */
9 #include <asm/processor.h>
10 #include <asm/ppc_asm.h>
11 #include <asm/vdso.h>
12 #include <asm/vdso_datapage.h>
13 #include <asm/asm-offsets.h>
14 #include <asm/unistd.h>
15 #include <asm/vdso/gettimeofday.h>
16
17         .text
18 /*
19  * Exact prototype of gettimeofday
20  *
21  * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
22  *
23  */
24 V_FUNCTION_BEGIN(__kernel_gettimeofday)
25         cvdso_call __c_kernel_gettimeofday
26 V_FUNCTION_END(__kernel_gettimeofday)
27
28
29 /*
30  * Exact prototype of clock_gettime()
31  *
32  * int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
33  *
34  */
35 V_FUNCTION_BEGIN(__kernel_clock_gettime)
36         cvdso_call __c_kernel_clock_gettime
37 V_FUNCTION_END(__kernel_clock_gettime)
38
39
40 /*
41  * Exact prototype of clock_getres()
42  *
43  * int __kernel_clock_getres(clockid_t clock_id, struct timespec *res);
44  *
45  */
46 V_FUNCTION_BEGIN(__kernel_clock_getres)
47         cvdso_call __c_kernel_clock_getres
48 V_FUNCTION_END(__kernel_clock_getres)
49
50 /*
51  * Exact prototype of time()
52  *
53  * time_t time(time *t);
54  *
55  */
56 V_FUNCTION_BEGIN(__kernel_time)
57         cvdso_call_time __c_kernel_time
58 V_FUNCTION_END(__kernel_time)