.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2011 Richard Weinberger <richrd@nod.at> |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | * |
---|
8 | 5 | * This vDSO turns all calls into a syscall so that UML can trap them. |
---|
9 | 6 | */ |
---|
.. | .. |
---|
16 | 13 | #include <linux/getcpu.h> |
---|
17 | 14 | #include <asm/unistd.h> |
---|
18 | 15 | |
---|
19 | | -int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) |
---|
| 16 | +int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) |
---|
20 | 17 | { |
---|
21 | 18 | long ret; |
---|
22 | 19 | |
---|
23 | | - asm("syscall" : "=a" (ret) : |
---|
24 | | - "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory"); |
---|
| 20 | + asm("syscall" |
---|
| 21 | + : "=a" (ret) |
---|
| 22 | + : "0" (__NR_clock_gettime), "D" (clock), "S" (ts) |
---|
| 23 | + : "rcx", "r11", "memory"); |
---|
25 | 24 | |
---|
26 | 25 | return ret; |
---|
27 | 26 | } |
---|
28 | | -int clock_gettime(clockid_t, struct timespec *) |
---|
| 27 | +int clock_gettime(clockid_t, struct __kernel_old_timespec *) |
---|
29 | 28 | __attribute__((weak, alias("__vdso_clock_gettime"))); |
---|
30 | 29 | |
---|
31 | | -int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) |
---|
| 30 | +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) |
---|
32 | 31 | { |
---|
33 | 32 | long ret; |
---|
34 | 33 | |
---|
35 | | - asm("syscall" : "=a" (ret) : |
---|
36 | | - "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory"); |
---|
| 34 | + asm("syscall" |
---|
| 35 | + : "=a" (ret) |
---|
| 36 | + : "0" (__NR_gettimeofday), "D" (tv), "S" (tz) |
---|
| 37 | + : "rcx", "r11", "memory"); |
---|
37 | 38 | |
---|
38 | 39 | return ret; |
---|
39 | 40 | } |
---|
40 | | -int gettimeofday(struct timeval *, struct timezone *) |
---|
| 41 | +int gettimeofday(struct __kernel_old_timeval *, struct timezone *) |
---|
41 | 42 | __attribute__((weak, alias("__vdso_gettimeofday"))); |
---|
42 | 43 | |
---|
43 | | -time_t __vdso_time(time_t *t) |
---|
| 44 | +__kernel_old_time_t __vdso_time(__kernel_old_time_t *t) |
---|
44 | 45 | { |
---|
45 | 46 | long secs; |
---|
46 | 47 | |
---|
.. | .. |
---|
50 | 51 | |
---|
51 | 52 | return secs; |
---|
52 | 53 | } |
---|
53 | | -int time(time_t *t) __attribute__((weak, alias("__vdso_time"))); |
---|
| 54 | +__kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time"))); |
---|
54 | 55 | |
---|
55 | 56 | long |
---|
56 | 57 | __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) |
---|