diff options
Diffstat (limited to 'arch/x86_64/kernel/vsyscall.c')
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 57660d58d500..06c34949bfdc 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/segment.h> | 42 | #include <asm/segment.h> |
43 | #include <asm/desc.h> | 43 | #include <asm/desc.h> |
44 | #include <asm/topology.h> | 44 | #include <asm/topology.h> |
45 | #include <asm/vgtod.h> | ||
45 | 46 | ||
46 | #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr))) | 47 | #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr))) |
47 | #define __syscall_clobber "r11","rcx","memory" | 48 | #define __syscall_clobber "r11","rcx","memory" |
@@ -57,26 +58,9 @@ | |||
57 | * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) | 58 | * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) |
58 | * Try to keep this structure as small as possible to avoid cache line ping pongs | 59 | * Try to keep this structure as small as possible to avoid cache line ping pongs |
59 | */ | 60 | */ |
60 | struct vsyscall_gtod_data_t { | ||
61 | seqlock_t lock; | ||
62 | |||
63 | /* open coded 'struct timespec' */ | ||
64 | time_t wall_time_sec; | ||
65 | u32 wall_time_nsec; | ||
66 | |||
67 | int sysctl_enabled; | ||
68 | struct timezone sys_tz; | ||
69 | struct { /* extract of a clocksource struct */ | ||
70 | cycle_t (*vread)(void); | ||
71 | cycle_t cycle_last; | ||
72 | cycle_t mask; | ||
73 | u32 mult; | ||
74 | u32 shift; | ||
75 | } clock; | ||
76 | }; | ||
77 | int __vgetcpu_mode __section_vgetcpu_mode; | 61 | int __vgetcpu_mode __section_vgetcpu_mode; |
78 | 62 | ||
79 | struct vsyscall_gtod_data_t __vsyscall_gtod_data __section_vsyscall_gtod_data = | 63 | struct vsyscall_gtod_data __vsyscall_gtod_data __section_vsyscall_gtod_data = |
80 | { | 64 | { |
81 | .lock = SEQLOCK_UNLOCKED, | 65 | .lock = SEQLOCK_UNLOCKED, |
82 | .sysctl_enabled = 1, | 66 | .sysctl_enabled = 1, |
@@ -96,6 +80,8 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) | |||
96 | vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; | 80 | vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; |
97 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; | 81 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; |
98 | vsyscall_gtod_data.sys_tz = sys_tz; | 82 | vsyscall_gtod_data.sys_tz = sys_tz; |
83 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; | ||
84 | vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic; | ||
99 | write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); | 85 | write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); |
100 | } | 86 | } |
101 | 87 | ||